A097933 Primes p that divide 3^((p-1)/2) - 1.
11, 13, 23, 37, 47, 59, 61, 71, 73, 83, 97, 107, 109, 131, 157, 167, 179, 181, 191, 193, 227, 229, 239, 241, 251, 263, 277, 311, 313, 337, 347, 349, 359, 373, 383, 397, 409, 419, 421, 431, 433, 443, 457, 467, 479, 491, 503, 541, 563, 577, 587, 599, 601, 613
Offset: 1
Keywords
Examples
For p = 5, 3^2 - 1 = 8 <> 3*k for any integer k, so 5 is not in this sequence. For p = 11, 3^5 - 1 = 242 = 11*22, so 11 is in this sequence.
Links
Programs
-
Haskell
a097933 n = a097933_list !! (n-1) a097933_list = [x | x <- a091998_list, a010051 x == 1] -- Reinhard Zumkeller, Jan 07 2012
-
Magma
[p: p in PrimesUpTo(1000) | p mod 24 in [1, 11, 13, 23]]; // Vincenzo Librandi, Mar 23 2013
-
Mathematica
Select[Prime[Range[300]], MemberQ[{1, 11, 13, 23}, Mod[#, 24]]&] (* Vincenzo Librandi, Mar 23 2013 *) Select[Prime[Range[2,200]],PowerMod[3,(#-1)/2,#]==1&] (* Harvey P. Dale, Jun 02 2020 *)
-
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(m, c); if(n<1, 0, c=0; m=0; while( c
Michael Somos, Aug 28 2006 */
Comments