OFFSET
1,4
LINKS
R. H. Hardin, Table of n, a(n) for n = 1..1000
FORMULA
G.f.: -1+(1+x^2/(1-x))*Product_{j>=1} ( 1+x^(2*p(j))/(1-x^(p(j))) ), where p(j) is the j-th prime. - Emeric Deutsch, Jun 27 2009
EXAMPLE
a(8)=5 because we have 3311, 2222, 22211, 221111, and 1^8. - Emeric Deutsch, Jun 27 2009
MAPLE
g := -1+(1+x^2/(1-x))*(product(1+x^(2*ithprime(j))/(1-x^ithprime(j)), j = 1 .. 20)): gser := series(g, x = 0, 70): seq(coeff(gser, x, n), n = 1 .. 60); # Emeric Deutsch, Jun 27 2009
MATHEMATICA
nmax = 100; Rest[CoefficientList[Series[-1 + (1 + x^2/(1-x)) * Product[1 + x^(2*Prime[k]) / (1 - x^Prime[k]), {k, 1, nmax}], {x, 0, nmax}], x]] (* Vaclav Kotesovec, Nov 28 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
R. H. Hardin, Jun 02 2009
EXTENSIONS
Definition edited to "primes or 1" by R. H. Hardin, Jun 22 2009
STATUS
approved