OFFSET
1,1
COMMENTS
Inspired by A001567.
Based on definition of a(n), certain terms are easy to determine, i.e., a(4*t+3) = 15 and a(20*t+17) = 33 for all t >= 0.
Least k > 1 such that k divides 2^(k*n-1) - 1 (for n >= 1) are 3, 80519, 3, 7, 3, 31, 3, 127, 3, 7, 3, 23, 3, 8191, 3, 7, 3, 131071, 3, 524287, 3, 7, 3, 47, ...
EXAMPLE
a(1) = A001567(1) = 341.
MATHEMATICA
a[n_] := Block[{k = 9}, While[PrimeQ[k] || PowerMod[2, k*n - 1, k] != 1, k += 2]; k]; Array[a, 54] (* Giovanni Resta, Sep 16 2018 *)
PROG
(PARI) isok(k, n)=Mod(2, k)^(k*n-1)==1;
a(n)={my(k=2); while (isprime(k)||!isok(k, n), k++); k; }
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Sep 15 2018
STATUS
approved