OFFSET
0,2
COMMENTS
For n > 0, a(n) is prime or pseudoprime (a Fermat pseudoprime to base 2).
It seems that for any odd initial term a(0), this recursion gives at most finitely many composite terms (which were not found in this sequence).
Conjecture: a(n) is prime for every n > 0, namely a(n) is the smallest odd prime p > a(n-1) such that 2^(p-1) == 1 (mod a(n-1)), with a(0) = 1.
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..1000
MATHEMATICA
A = {1}; While[Length[A] < 500, a = Last[A]; r = MultiplicativeOrder[2, a]; k = a + r; While[PowerMod[2, k - 1, k a] != 1, k = k + r]; AppendTo[A, k]]; Take[A, 75] (* Emmanuel Vantieghem, Apr 02 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Thomas Ordowski, Mar 12 2019
EXTENSIONS
More terms from Amiram Eldar, Mar 12 2019
STATUS
approved