OFFSET
1,1
COMMENTS
Conjectures:
(i) a(n) > 0 for all n > 0. Also, each natural number can be written as x^2 + y^2 + pi(z^2) (0 <= x <= y and z > 0) with z-1 or z+1 prime.
(ii) Any integer n > 1 can be written as x^3 + y^2 + pi(z^2) with x >= 0, y >= 0 and z > 0 such that y or z is prime.
(iii) Any integer n > 1 can be written as x^3 + pi(y^2) + pi(z^2) (x >= 0, y > 0 and z > 0) with y or z prime. Also, each integer n > 1 can be written as x^2 + pi(p^2) + pi(q^2) (x >= 0 and p >= q > 0) with p prime.
Compare these conjectures with the conjectures in A262746.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
EXAMPLE
a(22) = 2 since 22 = 0^3 + 4^2 + pi(4^2) = 0^3 + 2^2 + pi(8^2) with 4+1 = 5 and 8-1 = 7 both prime.
a(24) = 1 since 24 = 2^3 + 4^2 + pi(1^2) with 1+1 = 2 prime.
a(40) = 2 since 40 = 0^3 + 6^2 + pi(3^2) = 3^3 + 3^2 + pi(3^2) with 3-1 = 2 prime.
a(57) = 1 since 57 = 2^3 + 7^2 + pi(1^2) with 1+1 = 2 prime.
a(73) = 1 since 73 = 4^3 + 3^2 + pi(1^2) with 1+1 = 2 prime.
MATHEMATICA
SQ[n_]:=IntegerQ[Sqrt[n]]
f[n_]:=PrimePi[n^2]
Do[r=0; Do[If[f[k]>n, Goto[aa]]; If[PrimeQ[k-1]==False&&PrimeQ[k+1]==False, Goto[bb]]; Do[If[SQ[n-f[k]-x^3], r=r+1], {x, 0, (n-f[k])^(1/3)}]; Label[bb]; Continue, {k, 1, n}]; Label[aa]; Print[n, " ", r]; Continue, {n, 1, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Oct 04 2015
STATUS
approved