login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Please make a donation (tax deductible in USA) to keep the OEIS running. Over 5000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A002124 Number of compositions of n into a sum of odd primes.
(Formerly M0154 N0062)
3

%I M0154 N0062

%S 1,0,0,1,0,1,1,1,2,1,3,4,3,7,7,8,14,15,21,28,33,47,58,76,103,125,169,

%T 220,277,373,476,616,810,1037,1361,1763,2279,2984,3846,5006,6521,8428,

%U 10983,14249,18480,24048,31178,40520,52635,68281,88765,115211,149593,194381,252280,327696,425587,552527,717721

%N Number of compositions of n into a sum of odd primes.

%C Arises in studying the Goldbach conjecture.

%C The g.f. -(z-1)*(z+1)*(z**2+z+1)*(z**2-z+1)/(1-z**6-z**3-z**5-z**7+z**9) conjectured by _Simon Plouffe_ in his 1992 dissertation is wrong.

%D P. A. MacMahon, Properties of prime numbers deduced from the calculus of symmetric functions, Proc. London Math. Soc., 23 (1923), 290-316. [Coll. Papers, Vol. II, pp. 354-382] [The sequence i_n]

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H N. J. A. Sloane, <a href="/A002124/b002124.txt">Table of n, a(n) for n = 0..1000</a>

%H P. Flajolet and R. Sedgewick, <a href="http://algo.inria.fr/flajolet/Publications/books.html">Analytic Combinatorics</a>, 2009; see page 300

%H P. A. MacMahon, <a href="http://plms.oxfordjournals.org/content/s2-23/1/290.extract">Properties of prime numbers deduced from the calculus of symmetric functions</a>, Proc. London Math. Soc., 23 (1923), 290-316. = Coll. Papers, II, pp. 354-380.

%H Simon Plouffe, <a href="http://www.lacim.uqam.ca/%7Eplouffe/articles/MasterThesis.pdf">Approximations de séries génératrices et quelques conjectures</a>, Dissertation, Université du Québec à Montréal, 1992.

%H Simon Plouffe, <a href="http://www.lacim.uqam.ca/%7Eplouffe/articles/FonctionsGeneratrices.pdf">1031 Generating Functions and Conjectures</a>, Université du Québec à Montréal, 1992.

%H <a href="/index/Go#Goldbach">Index entries for sequences related to Goldbach conjecture</a>

%F a(0)=1, a(1)=a(2)=0; for n >= 3, a(n) = Sum_{ primes p with 3 <= p <= n} a(n-p). [MacMahon]

%F G.f. 1/( 1 - sum(k>=2, x^A000040(k) ) ). [_Joerg Arndt_, Sep 30 2012]

%p A002124 := proc(n) coeff(series(1/(1-add(z^numtheory[ithprime](j),j=2..n)),z=0,n+1),z,n) end;

%p M:=120; a:=array(0..M); a[0]:=1; a[1]:=0; a[2]:=0; for n from 3 to M do t1:=0; for k from 2 to n do p := ithprime(k); if p <= n then t1 := t1 + a[n-p]; fi; od: a[n]:=t1; od: [seq(a[n],n=0..M)]; [_N. J. A. Sloane_, after MacMahon, Dec 03 2006] [Used in A002125]

%t a[0] = 1; a[1] = a[2] = 0; a[n_] := a[n] = (s = 0; p = 3; While[p <= n, s = s + a[n-p]; p = NextPrime[p]]; s); a /@ Range[0, 58] (* _Jean-François Alcover_, Jun 28 2011, after P. A. MacMahon *)

%o (Haskell)

%o import Data.List (genericIndex)

%o a002124 n = genericIndex a002124_list n

%o a002124_list = 1 : f 1 [] a065091_list where

%o f x qs ps'@(p:ps)

%o | p <= x = f x (p:qs) ps

%o | otherwise = sum (map (a002124 . (x -)) qs) : f (x + 1) qs ps'

%o -- _Reinhard Zumkeller_, Mar 21 2014

%Y Cf. A002125, A023360, A024939, A077608.

%Y Cf. A065091.

%K nonn

%O 0,9

%A _N. J. A. Sloane_.

%E Better description and more terms from _Philippe Flajolet_, Nov 11 2002

%E Edited by _N. J. A. Sloane_, Dec 03 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified December 3 16:24 EST 2016. Contains 278745 sequences.