login
A299168
Number of ordered ways of writing n-th prime number as a sum of n primes.
4
1, 0, 0, 0, 5, 6, 42, 64, 387, 5480, 10461, 113256, 507390, 1071084, 4882635, 44984560, 382362589, 891350154, 7469477771, 33066211100, 78673599501, 649785780710, 2884039365010, 22986956007816, 306912836483025, 1361558306986280, 3519406658042964
OFFSET
1,5
LINKS
FORMULA
a(n) = [x^prime(n)] (Sum_{k>=1} x^prime(k))^n.
EXAMPLE
a(5) = 5 because fifth prime number is 11 and we have [3, 2, 2, 2, 2], [2, 3, 2, 2, 2], [2, 2, 3, 2, 2], [2, 2, 2, 3, 2] and [2, 2, 2, 2, 3].
MAPLE
b:= proc(n, t) option remember;
`if`(n=0, `if`(t=0, 1, 0), `if`(t<1, 0, add(
`if`(isprime(j), b(n-j, t-1), 0), j=1..n)))
end:
a:= n-> b(ithprime(n), n):
seq(a(n), n=1..30); # Alois P. Heinz, Feb 13 2021
MATHEMATICA
Table[SeriesCoefficient[Sum[x^Prime[k], {k, 1, n}]^n, {x, 0, Prime[n]}], {n, 1, 27}]
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 04 2018
STATUS
approved