%I #38 Feb 15 2021 09:02:39
%S 3,7,13,31,5,127,253,511,293,2047,1013,8191,375,1885,6945,131071,
%T 21905,524287,1048573,202951,1095249,8388607,2180425,2784601,1080599,
%U 6046435,23113817,536870911,23884363,2147483647,4294967293,8589934591,815291441,2654752543,19022463
%N a(n) is the smallest k > 1 such that 2^n - 2 divides k^n - 1, for n > 1.
%C All terms are odd.
%C Note that a(n) <= 2^n - 1.
%C If p is prime, then a(p) = 2^p - 1.
%F a(A000040(n)) = A001348(n).
%t a[n_] := Module[{k = 3, t = 2^n - 2}, While[PowerMod[k, n, t] != 1, k+=2]; k]; Array[a, 20, 2] (* _Amiram Eldar_, Jan 14 2021 *)
%Y Cf. A000040, A000918, A001348 (subsequence).
%K nonn
%O 2,1
%A _Thomas Ordowski_, Jan 14 2021
%E More terms from _Amiram Eldar_, Jan 14 2021
|