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

%I #14 Apr 30 2014 01:37:06

%S 3,7,13,17,23,37,43,47,53,67,73,83,97,103,107,113,127,137,157,163,167,

%T 173,193,197,223,227,233,257,263,277,283,293,307,313,317,337,347,353,

%U 367,373,383,397,433,443,457,463,467,487,503,523,547,557,563,577,587

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

%C Also odd primes congruent to {2, 3} mod 5, or primes with last digit 3 or 7. - _Alexander Adamchuk_, Nov 02 2006

%C 5 is not a square mod p. - _Michael Somos_, Aug 15 2012

%H Vincenzo Librandi, <a href="/A097957/b097957.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A003631(n-1). - _Alexander Adamchuk_, Nov 02 2006

%e 5^3 + 4^3 = 7*27

%t Select[Prime[Range[120]],Divisible[5^((#-1)/2)+4^((#-1)/2),#]&] (* _Harvey P. Dale_, Feb 25 2013 *)

%o (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","))) }

%o (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 */

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

%K nonn,easy

%O 1,1

%A _Cino Hilliard_, Sep 06 2004

%E Definition clarified by _Harvey P. Dale_, Feb 25 2013