cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A000607 Number of partitions of n into prime parts.

This page as a plain text file.
%I A000607 M0265 N0093 #232 May 13 2025 11:34:36
%S A000607 1,0,1,1,1,2,2,3,3,4,5,6,7,9,10,12,14,17,19,23,26,30,35,40,46,52,60,
%T A000607 67,77,87,98,111,124,140,157,175,197,219,244,272,302,336,372,413,456,
%U A000607 504,557,614,677,744,819,899,987,1083,1186,1298,1420,1552,1695,1850,2018,2198,2394,2605,2833,3079,3344
%N A000607 Number of partitions of n into prime parts.
%C A000607 a(n) gives the number of values of k such that A001414(k) = n. - _Howard A. Landman_, Sep 25 2001
%C A000607 Let W(n) = {prime p: There is at least one number m whose spf is p, and sopfr(m) = n}. Let V(n,p) = {m: sopfr(m) = n, p belongs to W(n)}. Then a(n) = sigma(|V(n,p)|). E.g.: W(10) = {2,3,5}, V(10,2) = {30,32,36}, V(10,3) = {21}, V(10,5) = {25}, so a(10) = 3+1+1 = 5. - _David James Sycamore_, Apr 14 2018
%C A000607 From _Gus Wiseman_, Jan 18 2020: (Start)
%C A000607 Also the number of integer partitions such that the sum of primes indexed by the parts is n. For example, the sum of primes indexed by the parts of the partition (3,2,1,1) is prime(3)+prime(2)+prime(1)+prime(1) = 12, so (3,2,1,1) is counted under a(12). The a(2) = 1 through a(14) = 10 partitions are:
%C A000607   1  2  11  3   22   4    32    41    33     5      43      6       44
%C A000607             21  111  31   221   222   42     322    331     51      52
%C A000607                      211  1111  311   321    411    421     332     431
%C A000607                                 2111  2211   2221   2222    422     3222
%C A000607                                       11111  3111   3211    3221    3311
%C A000607                                              21111  22111   4111    4211
%C A000607                                                     111111  22211   22221
%C A000607                                                             31111   32111
%C A000607                                                             211111  221111
%C A000607                                                                     1111111
%C A000607 (End)
%D A000607 R. Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; see p. 203.
%D A000607 Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem, Mathematics and Computer Education, Vol. 31, No. 1, pp. 24-28, Winter 1997.  MathEduc Database (Zentralblatt MATH, 1997c.01891).
%D A000607 B. C. Berndt and B. M. Wilson, Chapter 5 of Ramanujan's second notebook, pp. 49-78 of Analytic Number Theory (Philadelphia, 1980), Lect. Notes Math. 899, 1981, see Entry 29.
%D A000607 D. M. Burton, Elementary Number Theory, 5th ed., McGraw-Hill, 2002.
%D A000607 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.
%D A000607 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D A000607 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A000607 Hans Havermann, <a href="/A000607/b000607.txt">Table of n, a(n) for n = 0..50000</a> (first 1000 terms from T. D. Noe, terms 1001-20000 from Vaclav Kotesovec, terms 20001-50000 extracted from files by Hans Havermann)
%H A000607 K. Alladi and P. Erdős, <a href="http://projecteuclid.org/euclid.pjm/1102811427">On an additive arithmetic function</a>, Pacific J. Math., Volume 71, Number 2 (1977), 275-294.
%H A000607 George E. Andrews, Arnold Knopfmacher, and John Knopfmacher, <a href="http://dx.doi.org/10.1006/jnth.1999.2453">Engel expansions and the Rogers-Ramanujan identities</a>, J. Number Theory 80 (2000), 273-290. See Eq. 2.1.
%H A000607 George E. Andrews, Arnold Knopfmacher, and Burkhard Zimmermann, <a href="http://dx.doi.org/10.1016/j.jnt.2005.08.012">On the Number of Distinct Multinomial Coefficients</a>, Journal of Number Theory, Volume 118, Issue 1, May 2006, pp. 15-30.
%H A000607 Mohammad K. Azarian, <a href="https://web.archive.org/web/20100727063142/http://www.math-cs.ucmo.edu/~mjms/2004.1/azar6.pdf">A Generalization of the Climbing Stairs Problem II</a>, Missouri Journal of Mathematical Sciences, Vol. 16, No. 1, Winter 2004, pp. 12-17. Zentralblatt MATH, Zbl 1071.05501.
%H A000607 Paul Barry, <a href="https://arxiv.org/abs/1803.06408">Three Études on a sequence transformation pipeline</a>, arXiv:1803.06408 [math.CO], 2018.
%H A000607 Johann Bartel, R. K. Bhaduri, Matthias Brack, and M. V. N. Murthy, <a href="https://doi.org/10.1103/PhysRevE.95.052108">Asymptotic prime partitions of integers</a>, Phys. Rev. E, 95 (2017), 052108, <a href="https://arxiv.org/abs/1609.06497">arXiv:1609.06497 [math-ph]</a>, 2016-2017.
%H A000607 P. T. Bateman and P. Erdős, <a href="https://www.renyi.hu/~p_erdos/1956-15.pdf">Partitions into primes</a>, Publ. Math. Debrecen 4 (1956), 198-200.
%H A000607 J. Browkin, <a href="http://matwbn.icm.edu.pl/ksiazki/cm/cm5/cm5129.pdf">Sur les décompositions des nombres naturels en sommes de nombres premiers</a>, Colloquium Mathematicum 5 (1958), 205-207.
%H A000607 Edward A. Bender, <a href="http://www.jstor.org/stable/2028691">Asymptotic methods in enumeration</a>, SIAM Review 16 (1974), no. 4, p. 509.
%H A000607 L. M. Chawla and S. A. Shad, <a href="http://www.jstor.org/stable/2004512">Review of "On a trio-set of partition functions and their tables"</a>, Mathematics of Computation, Vol. 24, No. 110 (Apr., 1970), pp. 490-491.
%H A000607 P. Flajolet and R. Sedgewick, <a href="http://algo.inria.fr/flajolet/Publications/books.html">Analytic Combinatorics</a>, 2009; see Section VIII.6, pp. 576ff.
%H A000607 H. Gupta, <a href="http://www.dli.gov.in/rawdataupload/upload/insa/INSA_2/20005ad0_185.pdf">Partitions into distinct primes</a>, Proc. Nat. Acad. Sci. India, 21 (1955), 185-187.
%H A000607 O. P. Gupta and S. Luthra, <a href="https://insa.nic.in/writereaddata/UpLoadedFiles/PINSA/Vol21A_1955_3_Art08.pdf">Partitions into primes</a>, Proc. Nat. Inst. Sci. India. Part A. 21 (1955), 181-184.
%H A000607 R. K. Guy, <a href="/A000081/a000081.pdf">Letter to N. J. A. Sloane, 1988-04-12</a>. (annotated scanned copy)
%H A000607 R. K. Guy, <a href="http://www.jstor.org/stable/2322249">The strong law of small numbers</a>. Amer. Math. Monthly 95 (1988), no. 8, 697-712.
%H A000607 R. K. Guy, <a href="/A005165/a005165.pdf">The strong law of small numbers</a>. Amer. Math. Monthly 95 (1988), no. 8, 697-712. [Annotated scanned copy]
%H A000607 H. Havermann, <a href="http://chesswanks.com/seq/sopfr/">Tables of sum-of-prime-factors sequences (including sequence lengths, i.e., number of prime-parts partitions, for the first 50000)</a>.
%H A000607 BongJu Kim, <a href="https://arxiv.org/abs/1803.08095">Partition number identities which are true for all set of parts</a>, arXiv:1803.08095 [math.CO], 2018.
%H A000607 Vaclav Kotesovec, <a href="/A000607/a000607_2.jpg">Graph - asymptotic ratio for log(a(n)), without minor asymptotic term</a>.
%H A000607 Vaclav Kotesovec, <a href="http://mathoverflow.net/questions/180858/wrong-asymptotics-of-oeis-a000607">Wrong asymptotics of OEIS A000607?</a> (MathOverflow). Includes discussion of the contradiction between the results for the next-to-leading term in the asymptotic formulas by Vaughan and by Bartel et al.
%H A000607 John F. Loase (splurge(AT)aol.com), David Lansing, Cassie Hryczaniuk and Jamie Cahoon, <a href="http://www.maa.org/programs/faculty-and-departments/classroom-capsules-and-notes/a-variant-of-the-partition-function">A Variant of the Partition Function</a>, College Mathematics Journal, Vol. 36, No. 4 (Sep 2005), pp. 320-321.
%H A000607 Ljuben Mutafchiev, <a href="http://arxiv.org/abs/1407.4688">A Note on Goldbach Partitions of Large Even Integers</a>, arXiv:1407.4688 [math.NT], 2014-2015.
%H A000607 Igor Pak, <a href="https://arxiv.org/abs/1803.06636">Complexity problems in enumerative combinatorics</a>, arXiv:1803.06636 [math.CO], 2018.
%H A000607 N. J. A. Sloane, <a href="/transforms.txt">Transforms</a>.
%H A000607 R. C. Vaughan, <a href="http://dx.doi.org/10.1007/s11139-007-9037-5">On the number of partitions into primes</a>, Ramanujan J. vol. 15, no. 1 (2008) 109-121.
%H A000607 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimePartition.html">Prime Partition</a>.
%H A000607 Roger Woodford, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL10/Woodford/woodford82.html">Bounds for the Eventual Positivity of Difference Functions of Partitions</a>, Journal of Integer Sequences, Vol. 10 (2007), Article 07.1.3.
%H A000607 <a href="/index/Go#Goldbach">Index entries for sequences related to Goldbach conjecture</a>
%F A000607 Asymptotically a(n) ~ exp(2 Pi sqrt(n/log n) / sqrt(3)) (Ayoub).
%F A000607 a(n) = (1/n)*Sum_{k=1..n} A008472(k)*a(n-k). - _Vladeta Jovovic_, Aug 27 2002
%F A000607 G.f.: 1/Product_{k>=1} (1-x^prime(k)).
%F A000607 See the partition arrays A116864 and A116865.
%F A000607 From _Vaclav Kotesovec_, Sep 15 2014 [Corrected by _Andrey Zabolotskiy_, May 26 2017]: (Start)
%F A000607 It is surprising that the ratio of the formula for log(a(n)) to the approximation 2 * Pi * sqrt(n/(3*log(n))) exceeds 1. For n=20000 the ratio is 1.00953, and for n=50000 (using the value from Havermann's tables) the ratio is 1.02458, so the ratio is increasing. See graph above.
%F A000607 A more refined asymptotic formula is found by Vaughan in Ramanujan J. 15 (2008), pp. 109-121, and corrected by Bartel et al. (2017): log(a(n)) = 2*Pi*sqrt(n/(3*log(n))) * (1 - log(log(n))/(2*log(n)) + O(1/log(n))).
%F A000607 See Bartel, Bhaduri, Brack, Murthy (2017) for a more complete asymptotic expansion. (End)
%F A000607 G.f.: 1 + Sum_{i>=1} x^prime(i) / Product_{j=1..i} (1 - x^prime(j)). - _Ilya Gutkovskiy_, May 07 2017
%F A000607 a(n) = A184198(n) + A184199(n). - _Vaclav Kotesovec_, Jan 11 2021
%e A000607 n = 10 has a(10) = 5 partitions into prime parts: 10 = 2 + 2 + 2 + 2 + 2 = 2 + 2 + 3 + 3 = 2 + 3 + 5 = 3 + 7 = 5 + 5.
%e A000607 n = 15 has a(15) = 12 partitions into prime parts: 15 = 2 + 2 + 2 + 2 + 2 + 2 + 3 = 2 + 2 + 2 + 3 + 3 + 3 = 2 + 2 + 2 + 2 + 2 + 5 = 2 + 2 + 2 + 2 + 7 = 2 + 2 + 3 + 3 + 5 = 2 + 3 + 5 + 5 = 2 + 3 + 3 + 7 = 2 + 2 + 11 = 2 + 13 = 3 + 3 + 3 + 3 + 3 = 3 + 5 + 7 = 5 + 5 + 5.
%p A000607 with(gfun):
%p A000607 t1:=mul(1/(1-q^ithprime(n)),n=1..51):
%p A000607 t2:=series(t1,q,50):
%p A000607 t3:=seriestolist(t2); # fixed by _Vaclav Kotesovec_, Sep 14 2014
%t A000607 CoefficientList[ Series[1/Product[1 - x^Prime[i], {i, 1, 50}], {x, 0, 50}], x]
%t A000607 f[n_] := Length@ IntegerPartitions[n, All, Prime@ Range@ PrimePi@ n]; Array[f, 57] (* _Robert G. Wilson v_, Jul 23 2010 *)
%t A000607 Table[Length[Select[IntegerPartitions[n],And@@PrimeQ/@#&]],{n,0,60}] (* _Harvey P. Dale_, Apr 22 2012 *)
%t A000607 a[n_] := a[n] = If[PrimeQ[n], 1, 0]; c[n_] := c[n] = Plus @@ Map[# a[#] &, Divisors[n]]; b[n_] := b[n] = (c[n] + Sum[c[k] b[n - k], {k, 1, n - 1}])/n; Table[b[n], {n, 1, 20}] (* Thomas Vogler, Dec 10 2015: Uses Euler transform, caches computed values, faster than IntegerPartitions[] function. *)
%t A000607 nmax = 100; pmax = PrimePi[nmax]; poly = ConstantArray[0, nmax + 1]; poly[[1]] = 1; poly[[2]] = 0; poly[[3]] = -1; Do[p = Prime[k]; Do[poly[[j + 1]] -= poly[[j + 1 - p]], {j, nmax, p, -1}];, {k, 2, pmax}]; s = Sum[poly[[k + 1]]*x^k, {k, 0, Length[poly] - 1}]; CoefficientList[Series[1/s, {x, 0, nmax}], x] (* _Vaclav Kotesovec_, Jan 11 2021 *)
%o A000607 (PARI) N=66;x='x+O('x^N); Vec(1/prod(k=1,N,1-x^prime(k))) \\ _Joerg Arndt_, Sep 04 2014
%o A000607 (Haskell)
%o A000607 a000607 = p a000040_list where
%o A000607    p _      0 = 1
%o A000607    p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
%o A000607 -- _Reinhard Zumkeller_, Aug 05 2012
%o A000607 (Sage) [Partitions(n, parts_in=prime_range(n + 1)).cardinality() for n in range(100)]  # _Giuseppe Coppoletta_, Jul 11 2016
%o A000607 (Python)
%o A000607 from sympy import primefactors
%o A000607 l = [1, 0]
%o A000607 for n in range(2, 101):
%o A000607     l.append(sum(sum(primefactors(k)) * l[n - k] for k in range(1, n + 1)) // n)
%o A000607 l  # _Indranil Ghosh_, Jul 13 2017
%o A000607 (Magma) [1] cat [#RestrictedPartitions(n,{p:p in PrimesUpTo(n)}): n in [1..100]]; // _Marius A. Burtea_, Jan 02 2019
%Y A000607 G.f. = 1 / g.f. for A046675. See A046113 for the ordered (compositions) version.
%Y A000607 Cf. A046676, A048165, A004526, A051034, A000040, A001414, A000586 (distinct parts), A000041, A070214, A192541, A112021, A056768, A128515, A319265, A319266.
%Y A000607 Row sums of array A116865 and of triangle A261013.
%Y A000607 Column sums of A331416.
%Y A000607 Partitions whose Heinz number is divisible by their sum of primes are A330953.
%Y A000607 Partitions of whose sum of primes is divisible by their sum are A331379.
%Y A000607 Cf. A000720, A014689, A331385, A331387, A331415, A331417.
%K A000607 easy,nonn,nice
%O A000607 0,6
%A A000607 _N. J. A. Sloane_