OFFSET
1,2
COMMENTS
Original name was: Nonprimes n of the form 6m+1 such that (2^(n-1) mod n)=(4^(n-1) mod n)=(8^(n-1) mod n)=..=(k^(n-1) mod n) for k=2,4,8,..,smallest power of 2>n.
LINKS
Vincenzo Librandi and T. D. Noe, Table of n, a(n) for n = 1..1000
EXAMPLE
1 is a term because it is a nonprime and 9*1 = 9 divides 2^(1-1) - 1 = 0.
MATHEMATICA
n = 1; t = {}; While[Length[t] < 100, While[PrimeQ[n] || PowerMod[2, n-1, 9*n] != 1, n = n + 2]; AppendTo[t, n]; n = n + 2]; t (* T. D. Noe, Jul 25 2011 *)
PROG
(PARI) p=0; forprime(q=2, 1e5, for(n=p+1, q-1, if(Mod(2, 9*n)^(n-1)==1, print1(n", "))); p=q) \\ Charles R Greathouse IV, Jul 24 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Dec 18 2010
EXTENSIONS
Name changed by Arkadiusz Wesolowski, Jul 23 2011
STATUS
approved