OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..3312
FORMULA
G.f.: Sum_{k>=1} prime(k)*x^prime(k)*(1-x)^2/(1-2*x)^2.
a(n) ~ c * 2^n * n, where c = 0.27326606442562679135064648817419092073886899135... - Vaclav Kotesovec, Aug 18 2019
EXAMPLE
a(4) = 16: 1111, (2)11, 1(2)1, 11(2), (2)(2), (3)1, 1(3), 4.
MAPLE
a:= proc(n) option remember; add(a(n-j) +j*
`if`(isprime(j), ceil(2^(n-j-1)), 0), j=1..n)
end:
seq(a(n), n=0..33);
MATHEMATICA
a[n_] := a[n] = Sum[a[n-j]+j*If[PrimeQ[j], Ceiling[2^(n-j-1)], 0], {j, 1, n}];
a /@ Range[0, 33] (* Jean-François Alcover, Jan 03 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Aug 07 2019
STATUS
approved