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.

Showing 1-2 of 2 results.

A071330 Number of decompositions of n into sum of two prime powers.

Original entry on oeis.org

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
Offset: 1

Views

Author

Reinhard Zumkeller, May 19 2002

Keywords

Comments

a(2*n) > 0 (Goldbach's conjecture).
a(A071331(n)) = 0; A095840(n) = a(A000961(n)).

Examples

			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 is a prime power then 149-x is not.
		

Crossrefs

Programs

  • Haskell
    a071330 n = sum $
       map (a010055 . (n -)) $ takeWhile (<= n `div` 2) a000961_list
    -- Reinhard Zumkeller, Jan 11 2013
  • 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 B. Porter *)
  • 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
    

A071331 Numbers having no decomposition into a sum of two prime powers.

Original entry on oeis.org

1, 149, 331, 373, 509, 701, 757, 809, 877, 907, 959, 997, 1019, 1087, 1199, 1207, 1211, 1243, 1259, 1271, 1477, 1529, 1541, 1549, 1589, 1597, 1619, 1657, 1719, 1759, 1777, 1783, 1807, 1829, 1859, 1867, 1927, 1969, 1973, 2171, 2231
Offset: 1

Views

Author

Reinhard Zumkeller, May 19 2002

Keywords

Comments

Luca & Stanica show that this sequence contains infinitely many Fibonacci numbers. In particular, there is some N such that for all n > N, Fibonacci(1807873 + 3543120*n) is in this sequence. - Charles R Greathouse IV, Jul 06 2011
Chen shows that there are five consecutive odd numbers M-8, M-6, M-4, M-2, M, for which all are members of the sequence. Such M may be large; Chen shows that it is less than 2^(2^253000). In fact, there exists an arithmetic progression of such M, and thus they have positive density. - Charles R Greathouse IV, Jul 06 2011

Crossrefs

A071330(a(n))=0. Cf. A000961, A109829, A014092.

Programs

Showing 1-2 of 2 results.