OFFSET
0,339
COMMENTS
a(A214879(n)) = 0; a(A045636(n)) > 0; a(A214723(n)) = 1; a(A214511(n)) = n and a(m) < n for m < A214511(n). - Reinhard Zumkeller, Jul 29 2012
The smallest value of n such that a(n) = 2 is 338. (This helps distinguish it from the characteristic function of A045636.) - Wesley Ivan Hurt, Jun 13 2013
LINKS
EXAMPLE
For example, a(29) = 1 because 29 = 2^2 + 5^2. a(3) = 0 because there is no way to write 3 as sum of two squares of primes.
PROG
(Haskell)
a045698 n = length $ filter (\x -> x > 0 && a010051' x == 1) $
map (a037213 . (n -)) $
takeWhile (<= div n 2) a001248_list
-- Reinhard Zumkeller, Jul 29 2012
(PARI) a(n)=my(s=0, q); forprime(p=2, sqrtint(n\2), if(issquare(n-p^2, &q)&&isprime(q), s++)); s \\ Charles R Greathouse IV, Jun 04 2014
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
EXTENSIONS
More terms from Erich Friedman
STATUS
approved