OFFSET
0,4
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000 (first 1000 terms from T. D. Noe)
FORMULA
G.f.: (1+x)*Product(Product(1+x^(p(k)^j), j=1..infinity),k=1..infinity), where p(k) is the k-th prime (offset 0). - Emeric Deutsch, Aug 27 2007
EXAMPLE
a(10) = #{3^2+1,2^3+2,7+3,7+2+1,5+2^2+1,5+3+2,2^2+3+2+1} = 7.
MAPLE
g:=(1+x)*(product(product(1+x^(ithprime(k)^j), j=1..5), k=1..20)): gser:=series(g, x=0, 68): seq(coeff(gser, x, n), n=1..63); # Emeric Deutsch, Aug 27 2007
MATHEMATICA
m = 64; gf = (1+x)*Product[1+x^(Prime[k]^j), {j, 1, 5}, {k, 1, 18}] + O[x]^m; CoefficientList[gf, x] (* Jean-François Alcover, Mar 02 2019, from Maple *)
PROG
(PARI) lista(m) = {x = t + t*O(t^m); gf = (1+x)*prod(k=1, m, if (isprimepower(k), (1+x^k), 1)); for (n=0, m, print1(polcoeff(gf, n, t), ", ")); } \\ Michel Marcus, Mar 02 2019
(Haskell)
import Data.MemoCombinators (memo2, integral)
a106244 n = a106244_list !! n
a106244_list = map (p' 1) [0..] where
p' = memo2 integral integral p
p _ 0 = 1
p k m = if m < pp then 0 else p' (k + 1) (m - pp) + p' (k + 1) m
where pp = a000961 k
-- Reinhard Zumkeller, Nov 24 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Apr 26 2005
EXTENSIONS
Offset corrected and a(0)=1 added by Reinhard Zumkeller, Nov 24 2015
STATUS
approved