Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #8 May 04 2024 02:53:08
%S 182,239,27493,34522,800982,1251967,623098,6304056,6459524,20099637,
%T 22709274,35764191,40317977,54397650,166206108,187800003,165728858,
%U 152475014,282599844,312923750,154613663,485200742,912190662,548850444
%N Smallest k such that k^2+1 is divisible by A002144(n)^4.
%H Chai Wah Wu, <a href="/A145297/b145297.txt">Table of n, a(n) for n = 1..10000</a>
%e 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.
%o (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, ",")))}
%o (Python)
%o from itertools import islice
%o from sympy import nextprime, sqrt_mod_iter
%o def A145297_gen(): # generator of terms
%o p = 1
%o while (p:=nextprime(p)):
%o if p&3==1:
%o yield min(sqrt_mod_iter(-1,p**4))
%o A145297_list = list(islice(A145297_gen(),20)) # _Chai Wah Wu_, May 04 2024
%Y Cf. A002144 (primes of form 4n+1), A002313 (-1 is a square mod p), A059321, A145296, A145298, A145299.
%K nonn
%O 1,1
%A _Klaus Brockhaus_, Oct 11 2008