OFFSET
1,1
COMMENTS
In other words, least k > 0 such that 2*prime(n)+1 divides 2^k-1.
Iff 2*prime(n)+1 is prime then a(n) = prime(n) or 2*prime(n).
EXAMPLE
a(6) = 18 because 18 is the least integer such that 2^18 == 1 (mod 2*13+1) where 13 is prime(6).
MATHEMATICA
Table[MultiplicativeOrder[2, 2*Prime[n] + 1], {n, 1, 100}] (* Amiram Eldar, Jun 03 2023 *)
PROG
(PARI) a(n) = znorder(Mod(2, 2*prime(n)+1)); \\ Michel Marcus, Jun 04 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Alain Rocchelli, Jun 03 2023
STATUS
approved