OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
EXAMPLE
a(4) = 7745569 since A002144(4) = 29, 7745569^2+1 = 59993839133762 = 2*29^5*97*15077 and for no k < 7745569 does 29^5 divide k^2+1.
PROG
(PARI) {e=5; forprime(p=2, 200, 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 A145298_gen(): # generator of terms
p = 1
while (p:=nextprime(p)):
if p&3==1:
yield min(sqrt_mod_iter(-1, p**5))
CROSSREFS
KEYWORD
nonn
AUTHOR
Klaus Brockhaus, Oct 14 2008
STATUS
approved