OFFSET
1,3
COMMENTS
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
EXAMPLE
a(2) = 1 since 2 is prime with floor(sqrt(2-2)) = 0^2.
a(3) = 2 since 2 is prime with floor(sqrt(3-2)) = 1^2, and 3 is prime with floor(sqrt(3-3)) = 0^2.
a(9) = a(10) = 1 since 7 is prime with floor(sqrt(9-7)) = floor(sqrt(10-7)) = 1^2.
a(11) = 1 since 11 is prime with floor(sqrt(11-11)) = 0^2.
a(12) = 1 since 11 is prime with floor(sqrt(12-11)) = 1^2.
a(15) = a(16) = 1 since 13 is prime with floor(sqrt(15-13)) = floor(sqrt(16-13)) = 1^2.
a(17) = 1 since 17 is prime with floor(sqrt(17-17)) = 0^2.
MATHEMATICA
SQ[n_]:=IntegerQ[Sqrt[n]]
q[n_]:=SQ[Floor[Sqrt[n]]]
a[n_]:=Sum[If[q[n-Prime[k]], 1, 0], {k, 1, PrimePi[n]}]
Table[a[n], {n, 1, 70}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Feb 12 2014
STATUS
approved