OFFSET
1,2
COMMENTS
Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 3, 28.
(ii) Any integer n > 0 can be written as pi(k^2) + pi((m^2+1)/2) with k and m positive integers.
(iii) Each n = 1,2,3,... can be written as pi(k^2/2) + pi((m^2+1)/2) with k and m positive integers.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 1 since 1 = 0 + 1 = pi(1^2) + pi(2^2/2).
a(3) = 1 since 3 = 2 + 1 = pi(2^2) + pi(2^2/2).
a(28) = 1 since 28 = 11 + 17 = pi(6^2) + pi(11^2/2).
MATHEMATICA
s[n_]:=s[n]=PrimePi[n^2]
t[n_]:=t[n]=PrimePi[n^2/2]
Do[r=0; Do[If[s[k]>n, Goto[bb]]; Do[If[t[j]>n-s[k], Goto[aa]]; If[t[j]==n-s[k], r=r+1]; Continue, {j, 1, n-s[k]+1}]; Label[aa]; Continue, {k, 1, n}];
Label[bb]; Print[n, " ", r]; Continue, {n, 1, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Oct 09 2015
STATUS
approved