OFFSET
1,1
COMMENTS
A045698(a(n)) = 1. - Reinhard Zumkeller, Jul 29 2012
LINKS
EXAMPLE
a(1) = 8 = 2^2 + 2^2, and no other p^2 + q^2 sums to 8.
Both 7^2 + 17^2 and 13^2 + 13^2 sum to 338, so 338 is not in this sequence.
MATHEMATICA
nn = 2000; ps = Prime[Range[PrimePi[Sqrt[nn]]]]; t = Flatten[Table[ps[[i]]^2 + ps[[j]]^2, {i, Length[ps]}, {j, i, Length[ps]}]]; t = Select[t, # <= nn &]; Sort[Transpose[Select[Tally[t], #[[2]] == 1 &]][[1]]] (* T. D. Noe, Jul 26 2012 *)
PROG
(Haskell)
import Data.List (elemIndices)
a214723 n = a214723_list !! (n-1)
a214723_list = elemIndices 1 a045698_list
-- Reinhard Zumkeller, Jul 29 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
J. Stauduhar, Jul 26 2012
STATUS
approved