OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
2^3 = 1 mod 7, 3 is odd, so 7 is in the sequence.
MATHEMATICA
Select[Range[1, 999, 2], OddQ[MultiplicativeOrder[2, #]]&] (* Jean-François Alcover, Dec 20 2017 *)
PROG
(PARI) is(n)=n%2 && znorder(Mod(2, n))%2 \\ Charles R Greathouse IV, Jun 24 2015
(Python)
from sympy import n_order
from itertools import count, islice
def A036259_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n:n_order(2, n)&1, count(max(startvalue, 1)|1, 2))
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved