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.

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

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, Oct 11 2008

Keywords

Examples

			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.
		

Crossrefs

Cf. A002144 (primes of form 4n+1), A002313 (-1 is a square mod p), A059321, A145296, A145298, A145299.

Programs

  • 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