OFFSET
0,1
COMMENTS
a(n) is smallest k > 2^(2^n)+1 such that k == 1 (mod 2^n) and 2^(k-1) == 1 (mod k), so a(n) is an odd prime or a Fermat pseudoprime to base 2.
a(n) is the least k = 2^(2^n) + m*2^n + 1 for m > 0 such that 2^(k-1) == 1 (mod k).
The values of m = (a(n)-2^(2^n)-1)/2^n are 2, 1, 3, 3, 5, 12, 15, 3, 9, 202, 56, 304, 635, 11095, 8948, ...; is m = A307535(n) for all n > 4?
Conjecture: a(n) is prime for all n >= 0.
FORMULA
a(n) == 1 (mod 2^n).
MATHEMATICA
a[n_] := Module[{k = 2^(2^n) + 2}, While[PowerMod[2, k - 1, (2^(2^n) - 1)*k] != 1, k++]; k]; Array[a, 10, 0]
PROG
(PARI) a(n) = my(k=2^(2^n)+2); while( Mod(2, (2^(2^n)-1)*k)^(k-1) != 1, k++); k; \\ Michel Marcus, Apr 25 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar and Thomas Ordowski, Apr 13 2019
EXTENSIONS
a(8) from Chai Wah Wu, Apr 29 2019
STATUS
approved