Skip to content

Commit b1b82a9

Browse files
committed
in
1 parent 5410bdd commit b1b82a9

57 files changed

Lines changed: 3750 additions & 3795 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/src/index.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,6 +1570,9 @@ V035327
15701570
L036038
15711571
```
15721572
```@docs
1573+
L036040
1574+
```
1575+
```@docs
15731576
T037027
15741577
```
15751578
```@docs
@@ -2206,6 +2209,9 @@ V251568
22062209
V254749
22072210
```
22082211
```@docs
2212+
L257490
2213+
```
2214+
```@docs
22092215
V257993
22102216
```
22112217
```@docs
@@ -2437,6 +2443,12 @@ I325145
24372443
L325145
24382444
```
24392445
```@docs
2446+
L327003
2447+
```
2448+
```@docs
2449+
L327004
2450+
```
2451+
```@docs
24402452
V327491
24412453
```
24422454
```@docs

docs/src/modules.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ P. Luschny, [Generalized Binomial](http://oeis.org/wiki/User:Peter_Luschny/Exten
216216
[4] 1, 1, 4, 5, 14, 20, 48, 75, 165, 274, 571, 988, ...
217217
[5] 1, 1, 5, 6, 20, 27, 75, 110, 275, 429, 1001, 1637, ...
218218
[6] 1, 1, 6, 7, 27, 35, 110, 154, 429, 637, 1638, 2548, ...
219-
```
219+
```
220220

221221
* Multinacci, V309896, V006053, V188021, V231181
222222

@@ -437,13 +437,13 @@ For example consider the case n = 4. There are five integer partitions of 4:
437437

438438
* P = [[4], [3, 1], [2, 2], [2, 1, 1], [1, 1, 1, 1]]. The shapes are m times the parts of the integer partitions: S(m) = [[4m], [3m, m], [2m, 2m], [2m, m, m], [m, m, m, m]].
439439

440-
* In the case m = 1 we look at set partitions of {1, 2, 3, 4} with sizes in [[4], [3, 1], [2, 2], [2, 1, 1], [1, 1, 1, 1]] which gives rise to [1, 4, 3, 6, 1] with sum 15.
440+
* In the case m = 1 we look at set partitions of {1, 2, 3, 4} with sizes [[4], [3, 1], [2, 2], [2, 1, 1], [1, 1, 1, 1]] which gives rise to [1, 4, 3, 6, 1] with sum 15.
441441

442-
* In the case m = 2 we look at set partitions of {1, 2, .., 8} with sizes in [[8], [6, 2], [4, 4], [4, 2, 2], [2, 2, 2, 2]] which gives rise to [1, 28, 35, 210, 105] with sum 379.
442+
* In the case m = 2 we look at set partitions of {1, 2, .., 8} with sizes [[8], [6, 2], [4, 4], [4, 2, 2], [2, 2, 2, 2]] which gives rise to [1, 28, 35, 210, 105] with sum 379.
443443

444-
* In the case m = 0 we look at set partitions of {} with sizes in [[0], [0, 0], [0, 0], [0, 0, 0], [0, 0, 0, 0]] which gives rise to [1, 1, 1, 1, 1] with sum 5 (because the only partition of the empty set is the set that contains the empty set, thus from the definition T(0,4) = Sum_{S(0)} card({0}) = A000041(4) = 5).
444+
* In the case m = 0 we look at set partitions of {} with sizes [[0], [0, 0], [0, 0], [0, 0, 0], [0, 0, 0, 0]] which gives rise to [1, 1, 1, 1, 1] with sum 5 (because the only partition of the empty set is the set that contains the empty set, thus from the definition T(0,4) = Sum_{S(0)} card({0}) = A000041(4) = 5).
445445

446-
* If n runs through 0, 1, 2,... then the result is an irregular triangle in which the n-th row lists multinomials for partitions of [m*n] which have only parts which are multiples of m. These are the triangles A080575 (m = 1), A257490 (m = 2), A327003 (m = 3), A327004 (m = 4). In the case m = 0 the triangle is A000012 subdivided into rows of length A000041. See the references below how this case integrates into the full picture.
446+
* If n runs through 0, 1, 2,... then the result is an irregular triangle which the n-th row lists multinomials for partitions of [m*n] which have only parts which are multiples of m. These are the triangles A080575 (m = 1), A257490 (m = 2), A327003 (m = 3), A327004 (m = 4). In the case m = 0 the triangle is A000012 subdivided into rows of length A000041. See the references below how this case integrates into the full picture.
447447

448448
| type | m = 0 | m = 1 | m = 2 | m = 3 | m = 4 |
449449
|-------|-------|-------|-------|-------|-------|
@@ -458,11 +458,7 @@ See also [A260876](https://oeis.org/A260876).
458458

459459
  🔶  [SpigotPi](https://github.com/OpenLibMathSeq/IntegerSequences.jl/blob/master/src/SpigotPi.jl)
460460

461-
Computes the first n decimal digits of Pi, uses a variant of the spigot algorithm valid as long as the number of digits <= 54900.
462-
463-
Based on ideas of A. Sale (1968). Algorithm due to D. Saada (1988) and S. Rabinowitz (1991). Proof due to S. Rabinowitz and S. Wagon (1995).
464-
465-
https://www.maa.org/sites/default/files/pdf/pubs/amm_supplements/Monthly_Reference_12.pdf
461+
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).
466462

467463
* Pi, π, L000796
468464

src/Abundant.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,23 +73,23 @@ function demo()
7373
println(V005101(15))
7474
println(L005101(15))
7575

76-
for a in I005101(15)
76+
for a I005101(15)
7777
print(a, ", ")
7878
end
7979
println("...")
80-
for a in F005101(40)
80+
for a F005101(40)
8181
print(a, ", ")
8282
end
8383
println("...")
8484

85-
for n in 40:50
85+
for n 40:50
8686
println(n, "", isAbundant(n))
8787
end
88-
for n in 1:6
88+
for n 1:6
8989
println(n, "", L005101(n))
9090
end
9191

92-
for a in I005101(1000)
92+
for a I005101(1000)
9393
isodd(a) && print(a, " ")
9494
end
9595
println()

src/AltPartitions.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function NEXPAR(N::Int, Visit::Function)
5454
MTC = M[D] N
5555
fill!(PAR, 0)
5656
K = 0
57-
for I in 1:D, J in 1:M[I]
57+
for I 1:D, J 1:M[I]
5858
K = K + 1
5959
PAR[K] = R[I]
6060
end
@@ -146,12 +146,12 @@ function demo()
146146
# Prints the partitions given in the format used in function NEXPAR.
147147
PrintPartition(P) = P |> println
148148

149-
for n in 1:5
149+
for n 1:5
150150
VisitPartition(n, PrintPartition)
151151
println()
152152
end
153153

154-
for p in partitions(6)
154+
for p partitions(6)
155155
Println(p)
156156
end
157157
println()

src/AndreNumbers.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function André(m::Int, n::Int)
3535
haskey(CacheAndré, (m, n)) && return CacheAndré[(m, n)]
3636
n 0 && return fmpz(1)
3737
r = range(0, step = m, stop = n - 1)
38-
S = sum(binom(n, k) * André(m, k) for k in r)
38+
S = sum(binom(n, k) * André(m, k) for k r)
3939
return CacheAndré[(m, n)] = n % m == 0 ? -S : S
4040
end
4141

@@ -91,7 +91,7 @@ C000111() =
9191
A = 0
9292
D[k+s] = 0
9393
s = -s
94-
for j in 0:i
94+
for j 0:i
9595
A += D[k]
9696
D[k] = A
9797
k += s
@@ -117,14 +117,14 @@ function test()
117117

118118
if is_oeis_installed()
119119
V = [V000111, V178963, V178964, V181936, V250283]
120-
for v in V
120+
for v V
121121
SeqTest(v, 'V')
122122
end
123123
end
124124

125125
V = [1, 1, 1, 2, 5, 16, 61, 272, 1385, 7936, 50521]
126126
generator = C000111()
127-
for n in 1:10
127+
for n 1:10
128128
v = take!(generator)
129129
@test V[n] == v
130130
end
@@ -137,13 +137,13 @@ function test()
137137
end
138138

139139
function demo()
140-
for m in 1:8
141-
Println([André(m, n) for n in 0:11])
140+
for m 1:8
141+
Println([André(m, n) for n 0:11])
142142
end
143143

144144
println()
145145
generator = C000111()
146-
for n in 0:10
146+
for n 0:10
147147
v = take!(generator)
148148
println(n, "", v)
149149
end
@@ -152,12 +152,12 @@ end
152152

153153
"""
154154
155-
for m in 1:20, n in 0:100 André(m,n) end
155+
for m 1:20, n 0:100 André(m,n) end
156156
0.012252 seconds (66.73 k allocations: 1.341 MiB)
157157
"""
158158
function perf()
159159
GC.gc()
160-
@time (for m in 1:20, n in 0:100
160+
@time (for m 1:20, n 0:100
161161
André(m, n)
162162
end)
163163
end
@@ -170,7 +170,7 @@ end
170170

171171
main()
172172

173-
for n in 0:32
173+
for n 0:32
174174
println(André(3, n))
175175
end
176176

src/BellNumbers.jl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ function BellNumberList(m::Int)
3939

4040
A = ZArray(m)
4141
A[1] = fmpz(1)
42-
for n in 2:m-1
42+
for n 2:m-1
4343
A[n] = A[1]
44-
for k in n:-1:2
44+
for k n:-1:2
4545
A[k-1] += A[k]
4646
end
4747
R[n+1] = A[1]
@@ -108,7 +108,7 @@ function BellTrans(n::Int, k::Int, X::Array)
108108
return s
109109
end
110110

111-
for m in 1:n-k+1
111+
for m 1:n-k+1
112112
s += a * BellTrans(n - m, k - 1, X) * X[m]
113113
a = div(a * (n - m), m)
114114
end
@@ -137,7 +137,7 @@ function BellTrans(n::Int, k::Int, F::Function)
137137
return s
138138
end
139139

140-
for m in 1:n-k+1
140+
for m 1:n-k+1
141141
s += a * BellTrans(n - m, k - 1, F) * F(m - 1)
142142
a = div(a * (n - m), m)
143143
end
@@ -167,7 +167,7 @@ function BellTriangle(n::Int, seq)
167167
M = ZTriangle(n)
168168
i = 1
169169

170-
for j in 0:n-1, k in 0:j
170+
for j 0:n-1, k 0:j
171171
M[i] = BellTrans(j, k, seq)
172172
i += 1
173173
end
@@ -400,7 +400,7 @@ function test()
400400

401401
@testset "Bell" begin
402402
seq = fmpz[1, 1, 2, 5, 15, 52]
403-
a = [BellTrans(6, k, seq) for k in 0:5]
403+
a = [BellTrans(6, k, seq) for k 0:5]
404404
b = [0, 52, 205, 210, 85, 15]
405405
@test all(a .== b)
406406

@@ -410,7 +410,7 @@ function test()
410410
@test all(a[1:5] .== b[1:5])
411411

412412
a = fmpz[1, 1, 2, 5, 15, 52, 203]
413-
b = [BellNumber(n) for n in 0:6]
413+
b = [BellNumber(n) for n 0:6]
414414
@test all(a .== b)
415415

416416
if is_oeis_installed()
@@ -433,14 +433,14 @@ function demo()
433433
seq = [1, 1, 2, 5, 15, 52]
434434
len = size(seq)[1]
435435

436-
for n in 0:len
437-
println([BellTrans(n, k, seq) for k in 0:n])
436+
for n 0:len
437+
println([BellTrans(n, k, seq) for k 0:n])
438438
end
439439

440440
M = BellTriangle(len, seq)
441441
ShowAsΔ(M)
442442

443-
for n in 0:6
443+
for n 0:6
444444
println(n, " -> ", BellNumberList(n))
445445
end
446446

@@ -451,13 +451,13 @@ end
451451
"""
452452
453453
BellNumberList(1000) :: 0.539088 seconds (855.00 k allocations: 13.062 MiB)
454-
BellTriangle(100, [1 for _ in 1:100]) :: 0.576952 seconds (1.22 M allocations: 24.571 MB, 14.23% gc time)
454+
BellTriangle(100, [1 for _ 1:100]) :: 0.576952 seconds (1.22 M allocations: 24.571 MB, 14.23% gc time)
455455
"""
456456
function perf()
457457
GC.gc()
458458
BellNumberList(5)
459459
@time BellNumberList(1000)
460-
@time BellTriangle(100, [1 for _ in 1:100])
460+
@time BellTriangle(100, [1 for _ 1:100])
461461
end
462462

463463
function main()

0 commit comments

Comments
 (0)