login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A045698 Number of ways n can be written as the sum of two squares of primes. 7
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 (list; graph; refs; listen; history; text; internal format)
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
Sequence in context: A169674 A324053 A353480 * A106197 A369048 A011722
KEYWORD
easy,nonn
AUTHOR
EXTENSIONS
More terms from Erich Friedman
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)