OFFSET
1,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..400
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}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 04 2018
STATUS
approved