|
|
A307512
|
|
a(n) is the smallest k > 2^n such that 2^(k-1) == 1 (mod (2^n-1)*k).
|
|
1
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
a(n) = smallest k > 2^n such that k == 1 (mod n) and 2^(k-1) == 1 (mod k), so a(n) is an odd prime or a pseudoprime (Fermat pseudoprime to base 2).
Conjecture: a(n) is composite if and only if n = 2^j and 2^(2^j) + 1 is composite (presumably for all j > 4).
Note that a(2^j) = 2^(2^j) + 1 = A000215(j), the Fermat numbers.
For n <> 2^j, a(n) is the smallest k = 2^n - (2^n mod n) + m*n + 1 for m > 0 such that 2^(k-1) == 1 (mod k).
The last definition, also without the condition n <> 2^j, probably gives only primes.
|
|
LINKS
|
|
|
FORMULA
|
a(n) == 1 (mod n).
|
|
EXAMPLE
|
a(32) = 2^(2^5) + 1 = 641*6700417 is the smallest composite term.
|
|
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 *)
|
|
PROG
|
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|