A276825 Number of ways to write n as x^3 + P_2, where x and P_2 are positive integers with P_2 a product of at most two primes.
0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 2, 3, 2, 2, 2, 3, 1, 2, 2, 2, 2, 2, 2, 3, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 1, 3, 4, 2, 3, 2, 4, 1, 1, 3, 3, 3, 1, 2, 3, 2, 2
Offset: 1
Keywords
Examples
a(7) = 1 since 7 = 1^3 + 2*3 with 2 and 3 both prime. a(17) = 1 since 17 = 2^3 + 3^2 with 3 prime. a(28) = 1 since 28 = 3^3 + 1. a(76) = 1 since 76 = 3^3 + 7^2 with 7 prime. a(995) = 1 since 995 = 6^3 + 19*41 with 19 and 41 both prime. a(1072) = 1 since 1072 = 5^3 + 947 with 947 prime. a(1252) = 1 since 1252 = 9^3 + 523 with 523 prime. a(1574) = 1 since 1574 = 7^3 + 1231 with 1231 prime. a(1637) = 1 since 1637 = 7^3 + 2*647 with 2 and 647 both prime. a(2458) = 1 since 2458 = 5^3 + 2333 with 2333 prime. a(2647) = 1 since 2647 = 12^3 + 919 with 919 prime. a(2752) = 1 since 2752 = 5^3 + 37*71 with 37 and 71 both prime. a(2764) = 1 since 2764 = 11^3 + 1433 with 1433 prime. a(3275) = 1 since 3275 = 1^3 + 2*1637 with 2 and 1637 both prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- G. H. Hardy and J. E. Littlewood, Some problems of 'Partitio numerorum'; III: on the expression of a number as a sum of primes, Acta Mathematica, Vol. 44, pp. 1-70, 1923.
Programs
-
Mathematica
P2[n_]:=P2[n]=PrimeQ[Sqrt[n]]||(SquareFreeQ[n]&&Length[FactorInteger[n]]<=2) Do[r=0;Do[If[P2[n-k^3],r=r+1],{k,1,(n-1)^(1/3)}];Print[n," ",r];Continue,{n,1,80}]
Comments