cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A145299 Smallest k such that k^2+1 is divisible by A002144(n)^6.

This page as a plain text file.
%I A145299 #9 May 04 2024 02:55:09
%S A145299 1068,1999509,390112,253879357,756360062,2363588163,5041394261,
%T A145299 9435321777,41865466758,102666405913,197177418061,316411915250,
%U A145299 171829799914,625667121807,182312430890,1095001339019,6390289199260
%N A145299 Smallest k such that k^2+1 is divisible by A002144(n)^6.
%H A145299 Chai Wah Wu, <a href="/A145299/b145299.txt">Table of n, a(n) for n = 1..10000</a>
%e A145299 a(1) = 1068 since A002144(1) = 5, 1068^2+1 = 1140625 = 5^6*73 and for no k < 1068 does 5^6 divide k^2+1. a(11) = 197177418061 since A002144(11) = 97, 197177418061^2+1 = 38878934193202368999722 = 2*97^6*23337479509 and for no k < 197177418061 does 97^6 divide k^2+1.
%o A145299 (PARI) { e=6; forprime(p=2, 1000, if(p%4==1, k=lift(sqrt(-1+O(p^e))); if(k>p^e/2,k=p^e-k); print1(k, ", "))) }
%o A145299 (Python)
%o A145299 from itertools import islice
%o A145299 from sympy import nextprime, sqrt_mod_iter
%o A145299 def A145299_gen(): # generator of terms
%o A145299     p = 1
%o A145299     while (p:=nextprime(p)):
%o A145299         if p&3==1:
%o A145299             yield min(sqrt_mod_iter(-1,p**6))
%o A145299 A145299_list = list(islice(A145299_gen(),20)) # _Chai Wah Wu_, May 04 2024
%Y A145299 Cf. A002144 (primes of form 4n+1), A002313 (-1 is a square mod p), A059321, A145296, A145297, A145298.
%K A145299 nonn
%O A145299 1,1
%A A145299 _Klaus Brockhaus_, Oct 17 2008
%E A145299 More terms and efficient PARI program from. - _Max Alekseyev_, Oct 28 2008