OFFSET
1,3
COMMENTS
A045698(a(n)) = 0.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
a(n) ~ n. - Charles R Greathouse IV, Sep 01 2015
PROG
(Haskell)
import Data.List (elemIndices)
a214879 n = a214879_list !! (n-1)
a214879_list = elemIndices 0 a045698_list
-- Reinhard Zumkeller, Jul 29 2012
(PARI) is(n)=forprime(p=2, sqrtint(n), if(isprimepower(n-p^2)==2, return(0))); 1 \\ Charles R Greathouse IV, Sep 01 2015
(Python)
from sympy import primerange
def aupto(limit):
primes = list(primerange(2, int((limit-4)**.5)+2))
nums = [p*p + q*q for i, p in enumerate(primes) for q in primes[i:]]
return sorted(set(range(limit+1)) - set(k for k in nums if k <= limit))
print(aupto(76)) # Michael S. Branicky, Aug 13 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jul 29 2012
STATUS
approved