Skip to content

Commit 57a640d

Browse files
committed
tree
1 parent cb54a85 commit 57a640d

9 files changed

Lines changed: 3731 additions & 2927 deletions

File tree

Project.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ uuid = "b4b868b0-69a7-11e9-2db0-173b4e8e576c"
33
version = "0.2.0"
44

55
[deps]
6-
Atom = "c52e3926-4ff0-5f6e-af25-54175e0327b1"
76
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
87
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
98
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
@@ -12,7 +11,6 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
1211
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
1312
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
1413
IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
15-
Juno = "e5e0dc1b-0480-54bc-9374-aad01c23163d"
1614
Nemo = "2edaba10-b0f1-5616-af89-8c11ac63239a"
1715
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1816

docs/src/index.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,15 +772,27 @@ V000045
772772
is000045
773773
```
774774
```@docs
775+
V000055
776+
```
777+
```@docs
775778
G000073
776779
```
777780
```@docs
778781
L000073
779782
```
780783
```@docs
784+
V000081
785+
```
786+
```@docs
781787
L000085
782788
```
783789
```@docs
790+
V000088
791+
```
792+
```@docs
793+
V000106
794+
```
795+
```@docs
784796
G000108
785797
```
786798
```@docs
@@ -1057,6 +1069,9 @@ L002448
10571069
L002476
10581070
```
10591071
```@docs
1072+
V002494
1073+
```
1074+
```@docs
10601075
L002808
10611076
```
10621077
```@docs
@@ -1549,6 +1564,9 @@ V035327
15491564
L036038
15501565
```
15511566
```@docs
1567+
L036039
1568+
```
1569+
```@docs
15521570
L036040
15531571
```
15541572
```@docs
@@ -1645,6 +1663,15 @@ T053121
16451663
V054248
16461664
```
16471665
```@docs
1666+
V055542
1667+
```
1668+
```@docs
1669+
V055543
1670+
```
1671+
```@docs
1672+
V055544
1673+
```
1674+
```@docs
16481675
V055634
16491676
```
16501677
```@docs
@@ -1801,9 +1828,15 @@ T084938
18011828
V086799
18021829
```
18031830
```@docs
1831+
L087803
1832+
```
1833+
```@docs
18041834
L088218
18051835
```
18061836
```@docs
1837+
V088887
1838+
```
1839+
```@docs
18071840
T088969
18081841
```
18091842
```@docs
@@ -1837,6 +1870,9 @@ V094587
18371870
T094665
18381871
```
18391872
```@docs
1873+
V095350
1874+
```
1875+
```@docs
18401876
V095794
18411877
```
18421878
```@docs
@@ -1939,6 +1975,9 @@ L111533
19391975
T111593
19401976
```
19411977
```@docs
1978+
L115621
1979+
```
1980+
```@docs
19421981
T116392
19431982
```
19441983
```@docs
@@ -2110,6 +2149,9 @@ I206942
21102149
L206942
21112150
```
21122151
```@docs
2152+
V209397
2153+
```
2154+
```@docs
21132155
L210029
21142156
```
21152157
```@docs
@@ -2131,6 +2173,9 @@ T216916
21312173
V216919
21322174
```
21332175
```@docs
2176+
V217420
2177+
```
2178+
```@docs
21342179
T217537
21352180
```
21362181
```@docs
@@ -2469,3 +2514,6 @@ V327987
24692514
```@docs
24702515
L327988
24712516
```
2517+
```@docs
2518+
L328917
2519+
```

docs/src/modules.md

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ The partition numbers and the number of partitions of n into k parts are given a
248248

249249
The sum of all partition coefficients of n is efficiently computed with L005651.
250250

251+
* V000041, V088887, I072233, L072233, L036038, L078760, L005651, L262071, L292222, L115621, L328917
252+
251253
  🔶  [JacobiTheta](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/JacobiTheta.jl)
252254

253255

@@ -288,6 +290,12 @@ For background information see
288290
* J.-P. Allouche, T. Johnson, [Narayana's Cows and Delayed Morphisms](http://recherche.ircam.fr/equipes/repmus/jim96/actes/Allouche.ps).
289291
* C.M. Wilmott, [From Fibonacci to the mathematics of cows and quantum circuitry](https://iopscience.iop.org/article/10.1088/1742-6596/574/1/012097/pdf).
290292

293+
  🔶  [NodesAndEdges](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/NodesAndEdges.jl)
294+
295+
Rooted trees and similar topics.
296+
297+
* V000055, V000081, V000106, V209397, V217420, V095350, V002494, V055542, V055543, V055544, V000088, L087803, L036039
298+
291299
  🔶  [NumberTheory](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/NumberTheory.jl)
292300

293301

@@ -424,18 +432,6 @@ Return the numbers of partitions of an ``n``-set into ``m`` nonempty subsets.
424432
  🔶  [SetPartitionsMType](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/SetPartitionsMType.jl)
425433

426434

427-
428-
## Ordered set partitions of m-type
429-
430-
| type | m = 0 | m = 1 | m = 2 | m = 3 | m = 4 |
431-
|----|-------|-------|-------|-------|-------|
432-
| by shape | [A178803](https://oeis.org/A178803) | [A133314](https://oeis.org/A133314) | [A327022](https://oeis.org/A327022) | [A327023](https://oeis.org/A327023) | [A327024](https://oeis.org/A327024) |
433-
| by length | [A318144](https://oeis.org/A318144) | [A131689](https://oeis.org/A131689) | [A241171](https://oeis.org/A241171) | [A278073](https://oeis.org/A278073) | [A278074](https://oeis.org/A278074) |
434-
| diagonal | [A000142](https://oeis.org/A000142) | [A000142](https://oeis.org/A000142) | [A000680](https://oeis.org/A000680) | [A014606](https://oeis.org/A014606) | [A014608](https://oeis.org/A014608) |
435-
| row sum | [A101880](https://oeis.org/A101880) | [A000670](https://oeis.org/A000670) | [A094088](https://oeis.org/A094088) | [A243664](https://oeis.org/A243664) | [A243665](https://oeis.org/A243665) |
436-
| alt row sum | [A260845](https://oeis.org/A260845) | [A033999](https://oeis.org/A033999) | [A028296](https://oeis.org/A028296) | [A002115](https://oeis.org/A002115) | [A211212](https://oeis.org/A211212) |
437-
| central | [A053529](https://oeis.org/A053529) | [A210029](https://oeis.org/A210029) | [A281478](https://oeis.org/A281478) | [A281479](https://oeis.org/A281479) | [A281480](https://oeis.org/A281480) |
438-
439435
## Set partitions of m-type
440436

441437
For example consider the case n = 4. There are five integer partitions of 4:
@@ -461,6 +457,17 @@ For example consider the case n = 4. There are five integer partitions of 4:
461457

462458
See also [A260876](https://oeis.org/A260876).
463459

460+
## Ordered set partitions of m-type
461+
462+
| type | m = 0 | m = 1 | m = 2 | m = 3 | m = 4 |
463+
|------|-------|-------|-------|-------|-------|
464+
| by shape | [A178803](https://oeis.org/A178803) | [A133314](https://oeis.org/A133314) | [A327022](https://oeis.org/A327022) | [A327023](https://oeis.org/A327023) | [A327024](https://oeis.org/A327024) |
465+
| by length | [A318144](https://oeis.org/A318144) | [A131689](https://oeis.org/A131689) | [A241171](https://oeis.org/A241171) | [A278073](https://oeis.org/A278073) | [A278074](https://oeis.org/A278074) |
466+
| diagonal | [A000142](https://oeis.org/A000142) | [A000142](https://oeis.org/A000142) | [A000680](https://oeis.org/A000680) | [A014606](https://oeis.org/A014606) | [A014608](https://oeis.org/A014608) |
467+
| row sum | [A101880](https://oeis.org/A101880) | [A000670](https://oeis.org/A000670) | [A094088](https://oeis.org/A094088) | [A243664](https://oeis.org/A243664) | [A243665](https://oeis.org/A243665) |
468+
| alt row sum | [A260845](https://oeis.org/A260845) | [A033999](https://oeis.org/A033999) | [A028296](https://oeis.org/A028296) | [A002115](https://oeis.org/A002115) | [A211212](https://oeis.org/A211212) |
469+
| central | [A053529](https://oeis.org/A053529) | [A210029](https://oeis.org/A210029) | [A281478](https://oeis.org/A281478) | [A281479](https://oeis.org/A281479) | [A281480](https://oeis.org/A281480) |
470+
464471
  🔶  [SpigotPi](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/SpigotPi.jl)
465472

466473
Computes the first n decimal digits of Pi, uses a variant of the spigot algorithm valid as long as the number of digits <= 54900. Based on ideas of A. Sale (1968). Algorithm due to D. Saada (1988) and S. Rabinowitz (1991). Proof due to [Rabinowitz and S. Wagon](https://www.maa.org/sites/default/files/pdf/pubs/amm_supplements/Monthly_Reference_12.pdf) (1995).

src/IntPartitions.jl

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,18 @@
55

66
module IntPartitions
77

8-
using GeneralizedBinomial
8+
using GeneralizedBinomial, DataStructures
99

1010
export ModuleIntPartitions
1111
export IntegerPartitions, PartitionNumber
1212
export PartOrder, byNumPart, byMaxPart
1313
export PartitionCoefficientsByLength, PartitionCoefficientsByBiggestPart
1414
export V000041, I072233, L072233, L036038, L078760, L005651, L262071, L292222
15+
export L115621, L328917, V088887
16+
17+
#=
18+
a(n) is the sum of the parts of the partition having Heinz number n. We define the Heinz number of a partition p = [p_1, p_2, ..., p_r] as Product_{j=1..r} (p_j-th prime) (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). For example, for the partition [1, 1, 2, 4, 10] we get 2*2*3*7*29 = 2436. Example: a(33) = 7 because the partition with Heinz number 33 = 3 * 11 is [2,5]. - Emeric Deutsch, May 19 2015
19+
=#
1520

1621
"""
1722
@@ -27,6 +32,8 @@ The partition coefficients, which are the multinomial coefficients applied to pa
2732
The partition numbers and the number of partitions of n into k parts are given as PartitionNumber(n) and PartitionNumber(n, k), (V000041, L072233).
2833
2934
The sum of all partition coefficients of n is efficiently computed with L005651.
35+
36+
* V000041, V088887, I072233, L072233, L036038, L078760, L005651, L262071, L292222, L115621, L328917
3037
"""
3138
const ModuleIntPartitions = ""
3239

@@ -287,6 +294,32 @@ function L292222(n)
287294
[sum(Multinomial(p) for p IntegerPartitions(n, k)) for k 1:n]
288295
end
289296

297+
"""
298+
Return the signature of partitions in Hindenburg order.
299+
"""
300+
function L115621(n)
301+
h(p) = sort(collect(values(counter(p))))
302+
[h(p) for p IntegerPartitions(n)]
303+
end
304+
305+
"""
306+
Return the types of signatures of partitions of n, ordered firstly by decreasing greatest parts, then decreasing sum of parts, then by increasing number of parts.
307+
"""
308+
function L328917(n)
309+
n == 0 && return [[0]]
310+
h(p) = sort(collect(values(counter(p))), rev=true)
311+
sort(unique([h(p) for p IntegerPartitions(n)]), rev=true)
312+
end
313+
314+
"""
315+
Return the number of types of signatures of partitions of n.
316+
"""
317+
function V088887(n)
318+
h(p) = sort(collect(values(counter(p))), rev=true)
319+
length(unique([h(p) for p IntegerPartitions(n)]))
320+
end
321+
322+
290323
#START-TEST-########################################################
291324

292325
using Test, SeqUtils
@@ -421,6 +454,17 @@ function demo()
421454
println("\n-- Sum of all partition coefficients of n")
422455
L005651(10) |> println
423456
println()
457+
458+
println("\n-- Signature of partitions in Hindenburg order.")
459+
for n 1:6
460+
L115621(n) |> Println
461+
end
462+
463+
println("\n-- Types of partitions (counted by V088887).")
464+
for n 0:6
465+
print(n, " : "); Println(L328917(n))
466+
end
467+
println()
424468
end
425469

426470
"""

0 commit comments

Comments
 (0)