Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,27 @@
F partitions(n)
V p = [BigInt(1)] [+] [BigInt(0)] * n
L(i) 1 .. n
V k = 0
L
k++
V j = (k * (3 * k - 1)) I/ 2
I j > i
L.break
I k [&] 1
p[i] += p[i - j]
E
p[i] -= p[i - j]
j = (k * (3 * k + 1)) I/ 2
I j > i
L.break
I k [&] 1
p[i] += p[i - j]
E
p[i] -= p[i - j]
R p[n]
print(Partitions: (0.<15).map(x -> partitions(x)))
V start = time:perf_counter()
print(partitions(6666))
print(time:perf_counter() - start)