OFFSET
0,2
EXAMPLE
For n = 3, 2*n + 1 = 7. There are 4 partitions of 7 into parts with sizes 1, 3, 5, 9, 11 ... (the odd primes minus 2):
7 = 5 + 1 + 1
7 = 3 + 3 + 1
7 = 3 + 1 + 1 + 1 + 1
7 = 1 + 1 + 1 + 1 + 1 + 1 + 1
So, a(3) = 4.
MATHEMATICA
a[n_] := Module[{p},
p = Table[Prime[i] - 2, {i, 2, PrimePi[2*n + 3]}];
Length[IntegerPartitions[2*n + 1, {0, Infinity}, p]]]
Table[a[n], {n, 0, 60}]
PROG
(PARI)
\\ Slowish:
partitions_into(n, parts, from=1) = if(!n, 1, if(#parts==from, (0==(n%parts[from])), my(s=0); for(i=from, #parts, if(parts[i]<=n, s += partitions_into(n-parts[i], parts, i))); (s)));
odd_primes_minus2_upto_n_reversed(n) = { my(lista=List([])); forprime(p=3, n+2, listput(lista, p-2)); Vecrev(Vec(lista)); };
A333615(n) = partitions_into(n+n+1, odd_primes_minus2_upto_n_reversed(n+n+1)); \\ Antti Karttunen, May 09 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Luc Rousseau, Mar 29 2020
STATUS
approved