OFFSET
1,1
COMMENTS
The multiplicative order of x modulo y is the smallest positive number m such that x^m is congruent to 1 mod y.
REFERENCES
M. Kraitchik, Recherches sur la Théorie des Nombres. Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 1, p. 59.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
MATHEMATICA
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 *)
PROG
(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
(PARI) forprime(p=3, 10^4, if(znorder(Mod(2, p))==(p-1)/4, print1(p, ", "))); \\ Joerg Arndt, May 17 2013
(PARI) oddres(n)=n>>valuation(n, 2)
cyc(d)=my(k=1, t=1, y=(d-5)/(2*3)+1); while((t=oddres(t+d))>1 && k<=y, k++); k
forstep(n=1, 241537, [16, 8], if(cyc(n)==n>>3, print1(n", "))) ; \\ Charles R Greathouse IV, May 18 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms and better definition from Don Reble, Mar 11 2006
STATUS
approved