A002095 Number of partitions of n into nonprime parts.
1, 1, 1, 1, 2, 2, 3, 3, 5, 6, 8, 8, 12, 13, 17, 19, 26, 28, 37, 40, 52, 58, 73, 79, 102, 113, 139, 154, 191, 210, 258, 284, 345, 384, 462, 509, 614, 679, 805, 893, 1060, 1171, 1382, 1528, 1792, 1988, 2319, 2560, 2986, 3304, 3823, 4231, 4888, 5399, 6219, 6870
Offset: 0
Examples
a(6) = 3 from the partitions 6 = 1+1+1+1+1+1 = 4+1+1.
References
- L. M. Chawla and S. A. Shad, On a trio-set of partition functions and their tables, J. Natural Sciences and Mathematics, 9 (1969), 87-96.
- A. Murthy, Some new Smarandache sequences, functions and partitions, Smarandache Notions Journal Vol. 11 N. 1-2-3 Spring 2000 (but beware errors).
- Amarnath Murthy and Charles Ashbacher, Generalized Partitions and Some New Ideas on Number Theory and Smarandache Sequences, Hexis, Phoenix; USA 2005. See Section 2.6.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..5000 (first 1001 terms from T. D. Noe)
Programs
-
Haskell
a002095 = p a018252_list where p _ 0 = 1 p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m -- Reinhard Zumkeller, Jan 15 2012
-
Maple
g:=product((1-x^ithprime(j))/(1-x^j),j=1..60): gser:=series(g,x=0,60): seq(coeff(gser,x,n),n=0..55); # Emeric Deutsch, Apr 19 2006
-
Mathematica
NonPrime[n_Integer] := FixedPoint[n + PrimePi[ # ] &, n + PrimePi[n]]; CoefficientList[ Series[1/Product[1 - x^NonPrime[i], {i, 1, 50}], {x, 0, 50}], x]
-
PARI
first(n)=my(x='x+O('x^(n+1)),pr=1); forprime(p=2,n+1, pr *= (1-x^p)); pr/prod(i=1,n+1, 1-x^i) \\ Charles R Greathouse IV, Jun 23 2017
Formula
G.f.: Product_{i>0} (1-x^prime(i))/(1-x^i). - Vladeta Jovovic, Jul 31 2004
Extensions
More terms from James Sellers, Dec 23 1999
Corrected by Robert G. Wilson v, Feb 11 2002
Comments