OFFSET
1,2
COMMENTS
Believed to be a permutation of the natural numbers.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
PROG
(PARI) v=[1]; n=1; while(n<100, if(!issquarefree(n^2+v[#v]^2)&&!vecsearch(vecsort(v), n), v=concat(v, n); n=0); n++); v
(Haskell)
import Data.List (delete)
a258767 n = a258767_list !! (n-1)
a258767_list = 1 : f 1 [2..] where
f x zs = g zs where
g (y:ys) | a008966 (x^2 + y^2) == 1 = g ys
| otherwise = y : f y (delete y zs)
-- Reinhard Zumkeller, Jun 11 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Jun 09 2015
STATUS
approved