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.

A097957 Primes p such that p divides 5^((p-1)/2) + 4^((p-1)/2).

Original entry on oeis.org

3, 7, 13, 17, 23, 37, 43, 47, 53, 67, 73, 83, 97, 103, 107, 113, 127, 137, 157, 163, 167, 173, 193, 197, 223, 227, 233, 257, 263, 277, 283, 293, 307, 313, 317, 337, 347, 353, 367, 373, 383, 397, 433, 443, 457, 463, 467, 487, 503, 523, 547, 557, 563, 577, 587
Offset: 1

Views

Author

Cino Hilliard, Sep 06 2004

Keywords

Comments

Also odd primes congruent to {2, 3} mod 5, or primes with last digit 3 or 7. - Alexander Adamchuk, Nov 02 2006
5 is not a square mod p. - Michael Somos, Aug 15 2012

Examples

			5^3 + 4^3 = 7*27
		

Crossrefs

Cf. A003631 = Primes congruent to {2, 3} mod 5.

Programs

  • Mathematica
    Select[Prime[Range[120]],Divisible[5^((#-1)/2)+4^((#-1)/2),#]&] (* Harvey P. Dale, Feb 25 2013 *)
  • PARI
    \s = +-1,d=diff ptopm1d2(n,x,d,s) = { forprime(p=3,n,p2=(p-1)/2; y=x^p2 + s*(x-d)^p2; if(y%p==0,print1(p","))) }
    
  • PARI
    {a(n) = local( cnt, m ); if( n<1, return( 0 )); while( cnt < n, if( isprime( m++) && kronecker( 20, m )== -1, cnt++ )); m} /* Michael Somos, Aug 15 2012 */

Formula

a(n) = A003631(n-1). - Alexander Adamchuk, Nov 02 2006

Extensions

Definition clarified by Harvey P. Dale, Feb 25 2013