OFFSET
0,1
COMMENTS
The chain is formed by repeating the following: for any integer q, calculate ord_q(2) (the multiplicative order of 2 modulo q), then continue this process. The chain stops when it reaches an even number.
EXAMPLE
a(1): 3 -> 2.
a(2): 7 -> 3 -> 2.
a(3): 47 -> 23 -> 11 -> 10.
a(4): 1439 -> 719 -> 359 -> 179 -> 178.
a(5): 2879 -> 1439 -> 719 -> 359 -> 179 -> 178.
a(6): 214559 -> 107279 -> 53639 -> 2063 -> 1031 -> 515 -> 204.
a(7): 429119 -> 214559 -> 107279 -> 53639 -> 2063 -> 1031 -> 515 -> 204.
a(8): 858239 -> 429119 -> 214559 -> 107279 -> 53639 -> 2063 -> 1031 -> 515 -> 204.
PROG
(PARI) isok(k, n) = for (i=1, n-1, k = znorder(Mod(2, k)); if (!(k%2), return(0))); k = znorder(Mod(2, k)); if (k % 2, 0, 1);
a(n) = my(k=1); while(!isok(k, n), k+=2); k; \\ Michel Marcus, Jun 11 2026
(Python)
from sympy import n_order
def steps(k):
q, s = k, 0
while q % 2 == 1:
q = n_order(2, q)
s += 1
return s
def a(n):
k = 2
while steps(k) != n:
k += 1
return k
print([a(n) for n in range(6)])
CROSSREFS
KEYWORD
nonn,hard,more,new
AUTHOR
Nishant R. Gautam, Jun 11 2026
EXTENSIONS
a(9) from Michel Marcus, Jun 11 2026
STATUS
approved
