%I M5371 N2332 #36 Sep 08 2022 08:44:28
%S 113,281,353,577,593,617,1033,1049,1097,1153,1193,1201,1481,1601,1889,
%T 2129,2273,2393,2473,3049,3089,3137,3217,3313,3529,3673,3833,4001,
%U 4217,4289,4457,4801,4817,4937,5233,5393,5881,6121,6521,6569,6761,6793,6841,7129,7481,7577,7793,7817,7841,8209
%N Primes p such that the multiplicative order of 2 modulo p is (p-1)/4.
%C The multiplicative order of x modulo y is the smallest positive number m such that x^m is congruent to 1 mod y.
%D M. Kraitchik, Recherches sur la Théorie des Nombres. Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 1, p. 59.
%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H T. D. Noe, <a href="/A001134/b001134.txt">Table of n, a(n) for n = 1..1000</a>
%t Reap[For[p = 2, p <= 6761, p = NextPrime[p], If[ MultiplicativeOrder[2, p] == (p-1)/4, Sow[p]]]][[2, 1]] (* _Jean-François Alcover_, May 17 2013 *)
%o (Magma) [ p: p in PrimesUpTo(6761) | r eq 1 and Order(R!2) eq q where q,r is Quotrem(p,4) where R is ResidueClassRing(p) ]; // _Klaus Brockhaus_, Dec 02 2008
%o (PARI) forprime(p=3,10^4,if(znorder(Mod(2,p))==(p-1)/4,print1(p,", "))); \\ _Joerg Arndt_, May 17 2013
%o (PARI) oddres(n)=n>>valuation(n, 2)
%o cyc(d)=my(k=1, t=1,y=(d-5)/(2*3)+1); while((t=oddres(t+d))>1 && k<=y, k++); k
%o forstep(n=1, 241537, [16,8], if(cyc(n)==n>>3,print1(n", "))) ; \\ _Charles R Greathouse IV_, May 18 2013
%Y Cf. A001133, A001135, A001136, A115586, A115591.
%K nonn
%O 1,1
%A _N. J. A. Sloane_
%E More terms and better definition from _Don Reble_, Mar 11 2006