OFFSET
1,2
COMMENTS
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
MAPLE
a:= proc(n) option remember; local k; for k from 1+
`if`(n=1, 0, a(n-1)) while ormap(t->
irem(k^2+1, t)=0, [(j^2+1)$j=1..k-1]) do od; k
end:
seq(a(n), n=1..100); # Alois P. Heinz, Sep 18 2019
MATHEMATICA
a66743[ n_ ] := Length[ Select[ Range[ 1, n ], IntegerQ[ (n^2+1)/(#^2+1) ]& ] ]; Select[ Range[ 1, 300 ], a66743[ # ]==1& ]
PROG
(PARI) { n=0; for (m=1, 10^10, k=1; b=1; t=m^2 + 1; while (k < m - 1, if (t%(k^2 + 1)==0, b=0; break); k++); if (b, write("b066755.txt", n++, " ", m); if (n==1000, return)) ) } \\ Harry J. Smith, Mar 23 2010
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Jan 16 2002
EXTENSIONS
Edited by Dean Hickerson, Jan 20 2002
STATUS
approved