%I #32 Jul 05 2026 05:08:57
%S 2,3,7,47,1439,2879,214559,429119,858239,164255999
%N a(n) is the smallest integer k such that the iterated multiplicative-order chain k -> ord_k(2) -> ord_{ord_k(2)}(2) -> ... reaches an even number in exactly n steps.
%C 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.
%e a(1): 3 -> 2.
%e a(2): 7 -> 3 -> 2.
%e a(3): 47 -> 23 -> 11 -> 10.
%e a(4): 1439 -> 719 -> 359 -> 179 -> 178.
%e a(5): 2879 -> 1439 -> 719 -> 359 -> 179 -> 178.
%e a(6): 214559 -> 107279 -> 53639 -> 2063 -> 1031 -> 515 -> 204.
%e a(7): 429119 -> 214559 -> 107279 -> 53639 -> 2063 -> 1031 -> 515 -> 204.
%e a(8): 858239 -> 429119 -> 214559 -> 107279 -> 53639 -> 2063 -> 1031 -> 515 -> 204.
%o (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);
%o a(n) = my(k=1); while(!isok(k, n), k+=2); k; \\ _Michel Marcus_, Jun 11 2026
%o (Python)
%o from sympy import n_order
%o def steps(k):
%o q, s = k, 0
%o while q % 2 == 1:
%o q = n_order(2, q)
%o s += 1
%o return s
%o def a(n):
%o k = 2
%o while steps(k) != n:
%o k += 1
%o return k
%o print([a(n) for n in range(6)])
%Y Cf. A005384, A059452, A002326.
%K nonn,hard,more,new
%O 0,1
%A _Nishant R. Gautam_, Jun 11 2026
%E a(9) from _Michel Marcus_, Jun 11 2026