This site is supported by donations to The OEIS Foundation.

Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A071330 Number of decompositions of n into sum of two prime powers. 8
 0, 1, 1, 2, 2, 3, 2, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 4, 4, 2, 5, 3, 5, 4, 5, 3, 6, 3, 7, 5, 7, 4, 7, 2, 6, 4, 6, 3, 6, 3, 6, 5, 6, 2, 8, 3, 8, 4, 6, 2, 9, 3, 7, 4, 6, 2, 8, 3, 7, 4, 7, 3, 9, 2, 8, 5, 7, 2, 10, 3, 8, 6, 7, 3, 9, 2, 9, 4, 7, 4, 11, 3, 9, 4, 7, 3, 12, 4, 8, 3, 7, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,4 COMMENTS a(2*n) > 0 (Goldbach's conjecture). a(A071331(n)) = 0; A095840(n) = a(A000961(n)). LINKS T. D. Noe, Table of n, a(n) for n = 1..10000 EXAMPLE 10 = 1+3^2 = 2+2^3 = 3+7 = 5+5, therefore a(10) = 4; 11 = 2+3^2 = 3+2^3 = 4+7, therefore a(11) = 3; 12 = 1+11 = 3+3^2 = 2^2+2^3 = 5+7, therefore a(12) = 4; a(149)=0, as for all x<149: if x prime power then 149-x not. MATHEMATICA primePowerQ[n_] := Length[ FactorInteger[n]] == 1; a[n_] := (r = 0; Do[ If[ primePowerQ[k] && primePowerQ[n-k], r++], {k, 1, Floor[n/2]}]; r); Table[a[n], {n, 1, 95}](* Jean-François Alcover, Nov 17 2011, after Michael Porter *) PROG (PARI) ispp(n) = (omega(n)==1 || n==1) A071330(n) = {local(r); r=0; for(i=1, floor(n/2), if(ispp(i) && ispp(n-i), r++)); r} \\ Michael B. Porter, Dec 04 2009 (PARI) a(n)=my(s); forprime(p=2, n\2, if(isprimepower(n-p), s++)); for(e=2, log(n)\log(2), forprime(p=2, sqrtnint(n\2, e), if(isprimepower(n-p^e), s++))); s+(!!isprimepower(n-1))+(n==2) \\ Charles R Greathouse IV, Nov 21 2014 (Haskell) a071330 n = sum \$    map (a010055 . (n -)) \$ takeWhile (<= n `div` 2) a000961_list -- Reinhard Zumkeller, Jan 11 2013 CROSSREFS Cf. A000961, A002375, A071331, A061358, A109829, A010055. Sequence in context: A182745 A129843 A050430 * A092333 A107452 A205018 Adjacent sequences:  A071327 A071328 A071329 * A071331 A071332 A071333 KEYWORD nonn,nice,changed AUTHOR Reinhard Zumkeller, May 19 2002 STATUS approved

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

Content is available under The OEIS End-User License Agreement .