OFFSET
1,2
COMMENTS
Believed to be a permutation of the natural numbers.
MATHEMATICA
f[n_] := Block[{a = {1}, k}, For[k = 2, k <= n, k++, i = 1; While[Or[PrimeQ[i^2 + a[[k - 1]]^2], MemberQ[a, i]], i++]; AppendTo[a, i]]; a]; f@ 120 (* Michael De Vlieger, Jun 10 2015 *)
PROG
(PARI) v=[1]; n=1; while(n<100, if(!isprime(n^2+v[#v]^2)&&!vecsearch(vecsort(v), n), v=concat(v, n); n=0); n++); v
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Jun 08 2015
STATUS
approved