OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 182 since A002144(1) = 5, 182^2+1 = 33125 = 5^4*53 and for no k < 182 does 5^4 divide k^2+1.
PROG
(PARI) {e=4; forprime(p=2, 250, if(p%4==1, q=p^e; m=q; while(!ispower(m-1, 2, &n), m=m+q); print1(n, ", ")))}
(Python)
from itertools import islice
from sympy import nextprime, sqrt_mod_iter
def A145297_gen(): # generator of terms
p = 1
while (p:=nextprime(p)):
if p&3==1:
yield min(sqrt_mod_iter(-1, p**4))
CROSSREFS
KEYWORD
nonn
AUTHOR
Klaus Brockhaus, Oct 11 2008
STATUS
approved