OFFSET
1,4
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..1000
FORMULA
EXAMPLE
a(6)=4, as there are 4 decompositions for A000040(6)=13:
6+5+2 = 6+4+3 = 6+4+2+1 = 5+4+3+1 = 13.
MATHEMATICA
(* This program is not convenient for a large number of terms *) a[n_] := Count[ IntegerPartitions[ Prime[n], {2, Floor[n/2 + 2]}, Range[n] ], nn_ /; Length[nn] == Length[nn // Union] ]; Table[Print[n, " ", an = a[n]]; an, {n, 1, 25}] (* Jean-François Alcover, Jun 25 2013 *)
PROG
(Haskell)
a067953 n = p [1..n] $ a000040 n where
p _ 0 = 1
p [] _ = 0
p (k:ks) m | m < k = 0 | otherwise = p ks (m - k) + p ks m
-- Reinhard Zumkeller, Nov 22 2011
(PARI) a(n)=my(p=prime(n), x='x); polcoeff(prod(k=1, n, 1+x^k, O(x^(p+1))+1), p) \\ Charles R Greathouse IV, Jun 25 2013
(PARI) first(n)=my(v=vector(n), x='x, P=O(x^(prime(n)+1))+1, i); forprime(p=2, prime(n), P*=1+x^i++; v[i]=polcoeff(P, p)); v \\ Charles R Greathouse IV, Jun 25 2013
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
Reinhard Zumkeller, Mar 06 2002
EXTENSIONS
a(36)-a(38) from Donovan Johnson, Aug 23 2010
STATUS
approved