OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..1000
MATHEMATICA
q[n_] := Module[{m = n+1}, While[!Divisible[m^2 + 1, n^2 + 1], m++]; m == n^2 - n + 1]; Select[Range[200], q] (* Amiram Eldar, May 05 2022 *)
PROG
(PARI) for(n=0, 300, q=n+1; while((q^2+1)%(n^2+1)>0, q++); if(q==n^2-n+1, print1(n, ", ")))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, May 30 2002
EXTENSIONS
a(1) = 0 added by Amiram Eldar, May 05 2022
STATUS
approved