A276415 Number of ways to write n as p + x^3 + y^4, where p is a prime, and x and y are nonnegative integers.
0, 1, 3, 3, 2, 2, 2, 2, 1, 1, 3, 3, 3, 3, 2, 1, 1, 3, 5, 4, 3, 2, 2, 3, 2, 2, 3, 2, 4, 5, 5, 4, 3, 2, 3, 1, 3, 4, 4, 3, 3, 2, 3, 3, 5, 4, 4, 4, 2, 3, 2, 1, 3, 4, 3, 3, 2, 2, 3, 4, 4, 4, 2, 2, 2, 2, 5, 5, 5, 4, 4, 4, 2, 4, 5, 3, 3, 2, 2, 5
Offset: 1
Keywords
Examples
a(2) = 1 since 2 = 2 + 0^3 + 0^4 with 2 prime. a(6) = 2 since 6 = 5 + 0^3 + 1^4 = 5 + 1^3 + 0^4 with 5 prime. a(9) = 1 since 9 = 7 + 1^3 + 1^4 with 7 prime. a(10) = 1 since 10 = 2 + 2^3 + 0^4 with 2 prime. a(16) = 1 since 16 = 7 + 2^3 + 1^4 with 7 prime. a(17) = 1 since 17 = 17 + 0^3 + 0^4 with 17 prime. a(36) = 1 since 36 = 19 + 1^3 + 2^4 with 19 prime. a(52) = 1 since 52 = 43 + 2^3 + 1^4 with 43 prime. a(502) = 1 since 502 = 421 + 0^3 + 3^4 with 421 prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Ju. V. Linnik, An asymptotic formula in an additive problem of Hardy-Littlewood, Izv. Akad. Nauk SSSR Ser. Mat., 24 (1960), 629-706 (Russian).
Programs
-
Maple
N:= 1000: # to get a(1) to a(N) A:= Vector(N): for p in select(isprime, [2,seq(i,i=3..N,2)]) do for x from 0 while p + x^3 <= N do for y from 0 while p + x^3 + y^4 <= N do r:= p+x^3+y^4; A[r]:= A[r]+1 od od od: convert(A,list); # Robert Israel, Oct 05 2016
-
Mathematica
Do[r=0;Do[If[PrimeQ[n-x^3-y^4],r=r+1],{x,0,n^(1/3)},{y,0,(n-x^3)^(1/4)}];Print[n," ",r];Continue,{n,1,80}]
Comments