OFFSET
0,4
COMMENTS
Honsberger shows that the primes-including-1 are a complete sequence and therefore all numbers in this sequence exceed zero. - Ron Knott, Aug 27 2016
Number of partitions of n into distinct noncomposite numbers. - Omar E. Pol, Dec 14 2024
REFERENCES
Ross Honsberger, Mathematical Gems III, The Mathematical Association of America, 1985, pages 127-128.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
FORMULA
G.f.: (1 + x)*Product_{k>=1} (1 + x^prime(k)). - Ilya Gutkovskiy, Dec 31 2016
EXAMPLE
a(11) = 3 since 11 = 1+2+3+5=1+3+7 has 3 partitions of distinct primes-including-1. - Ron Knott, Aug 27 2016
MAPLE
s:= proc(n) option remember;
`if`(n<1, n+1, ithprime(n)+s(n-1))
end:
b:= proc(n, i) option remember; (p-> `if`(n=0, 1,
`if`(n>s(i), 0, b(n, i-1)+ `if`(p>n, 0,
b(n-p, i-1)))))(`if`(i<1, 1, ithprime(i)))
end:
a:= n-> b(n, numtheory[pi](n)):
seq(a(n), n=0..100); # Alois P. Heinz, Aug 27 2016
MATHEMATICA
myprime[ n_ ] := If[ n===0, 1, Prime[ n ] ]; ta1=Table[ Product[ 1+z^myprime[ k ], {k, 0, n} ]~CoefficientList~z, {n, 31, 32} ]; leveled=Count[ Take[ Last@ta1, Length@ta1[ [ -2 ] ] ]-ta1[ [ -2 ] ], 0 ]; Take[ Last@ta1, leveled ]
Table[Length@ DeleteCases[DeleteCases[IntegerPartitions@ n, {___, a_, ___} /; CompositeQ@ a], w_ /; MemberQ[Differences@ w, 0]], {n, 0, 60}] (* Michael De Vlieger, Aug 27 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Wouter Meeussen, Dec 17 1998
STATUS
approved