A307512 a(n) is the smallest k > 2^n such that 2^(k-1) == 1 (mod (2^n-1)*k).
3, 5, 13, 17, 41, 67, 197, 257, 523, 1031, 2069, 4129, 8243, 16451, 32911, 65537, 131479, 262153, 524591, 1048601, 2097229, 4194389, 8388791, 16777441, 33554501, 67108913, 134217757, 268435889, 536871259, 1073741971, 2147484949, 4294967297, 8589934651, 17179869827
Offset: 1
Keywords
Examples
a(32) = 2^(2^5) + 1 = 641*6700417 is the smallest composite term.
Programs
-
Mathematica
a[n_] := Module[{k = 2^n + 1}, While[PowerMod[2, k - 1, (2^n - 1)*k] != 1, k++]; k]; Array[a, 50] (* Amiram Eldar, Apr 12 2019 *)
-
PARI
a(n) = my(k=2^n+1); while( Mod(2, (2^n-1)*k)^(k-1) != 1, k++); k; \\ Michel Marcus, Apr 25 2019
Formula
a(n) == 1 (mod n).
a(2^j) = A000215(j).
Extensions
More terms from Amiram Eldar, Apr 12 2019
Comments