OFFSET
1,1
COMMENTS
a(53) = 3374376505370. a(52) and terms following a(53) are greater than 4*10^13. - Giovanni Resta, Jul 02 2018
LINKS
EXAMPLE
a(2) = 338 because 338 = 7^2 + 17^2 = 13^2 + 13^2 and 338 is the least number with this property.
MATHEMATICA
nn = 10^6; 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 &]; t2 = Sort[Tally[t]]; u = Union[Transpose[t2][[2]]]; d = Complement[Range[u[[-1]]], u]; If[d == {}, nLim = u[[-1]], nLim = d[[1]]-1]; t3 = Table[Select[t2, #[[2]] == n &, 1][[1]], {n, nLim}]; Transpose[t3][[1]]
PROG
(Haskell)
import Data.List (elemIndex)
import Data.Maybe (fromJust)
a214511 = (+ 1) . fromJust . (`elemIndex` a045698_list)
-- Reinhard Zumkeller, Jul 29 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Jul 26 2012
EXTENSIONS
a(21)-a(26) from Donovan Johnson, Jul 29 2012
STATUS
approved