OFFSET
1,3
COMMENTS
Conjecture: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 2, 8.
This is similar to the conjecture in A262785.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Zhi-Wei Sun, Some mysterious representations of integers, a message to Number Theory Mailing List, Oct. 25, 2015.
EXAMPLE
a(1) = 1 since 1 = 0^2 + 2*0^2 + 2*(2-1)/2 with 2 prime.
a(2) = 1 since 2 = 1^2 + 2*0^2 + 2*(2-1)/2 with 2 prime.
a(8) = 1 since 8 = 0^2 + 2*1^2 + 3*(3+1)/2 with 3 prime.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
f[d_, n_]:=f[d, n]=Prime[n](Prime[n]+(-1)^d)/2
Do[r=0; Do[If[SQ[n-f[d, k]-2x^2], r=r+1], {d, 0, 1}, {k, 1, PrimePi[(Sqrt[8n+1]-(-1)^d)/2]}, {x, 0, Sqrt[(n-f[d, k])/2]}]; Print[n, " ", r]; Continue, {n, 1, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Oct 31 2015
STATUS
approved