OFFSET
0,3
COMMENTS
The predecessors of prime numbers are {1, 2, 4, 6, 10, 12, ...} = A006093.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
EXAMPLE
The partitions for n=0..7 are:
(),
(1),
(2), (11),
(21),(111),
(4), (22), (211), (1111),
(41),(221),(2111),(11111),
(6), (42), (411), (222), (2211), (21111), (111111),
(61),(421),(4111),(2221),(22111),(211111),(1111111).
MAPLE
b:= proc(n, i) option remember; `if`(n=0 or i=2, 1,
b(n, prevprime(i))+`if`(i-1>n, 0, b(n-i+1, i)))
end:
a:= n-> b(n, nextprime(n)):
seq(a(n), n=0..60); # Alois P. Heinz, Jan 11 2017
# second Maple program:
a:= proc(n) option remember; `if`(n=0, 1, add(a(n-j)*add(`if`(
isprime(d+1), d, 0), d=numtheory[divisors](j)), j=1..n)/n)
end:
seq(a(n), n=0..60); # Alois P. Heinz, Jun 07 2018
MATHEMATICA
nn=60; invser=Series[Product[1-x^(Prime[n]-1), {n, PrimePi[nn+1]}], {x, 0, nn}];
CoefficientList[1/invser, x]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jan 11 2017
STATUS
approved