login
A145297
Smallest k such that k^2+1 is divisible by A002144(n)^4.
7
182, 239, 27493, 34522, 800982, 1251967, 623098, 6304056, 6459524, 20099637, 22709274, 35764191, 40317977, 54397650, 166206108, 187800003, 165728858, 152475014, 282599844, 312923750, 154613663, 485200742, 912190662, 548850444
OFFSET
1,1
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))
A145297_list = list(islice(A145297_gen(), 20)) # Chai Wah Wu, May 04 2024
CROSSREFS
Cf. A002144 (primes of form 4n+1), A002313 (-1 is a square mod p), A059321, A145296, A145298, A145299.
Sequence in context: A054985 A124185 A218563 * A056091 A272361 A158553
KEYWORD
nonn
AUTHOR
Klaus Brockhaus, Oct 11 2008
STATUS
approved