OFFSET
1,2
COMMENTS
From Robert G. Wilson v, Aug 02 2021: (Start)
Prime terms: 2, then A156048.
The exponents of the powers of two which are terms: 0, 1, then A014741(n)+1.
The vast majority of terms are congruent to 8 (mod 24); no terms are congruent to 4 (mod 6) nor to 3 (mod 10).
(End)
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..1189 (first 645 terms from Hiroaki Yamanouchi).
MATHEMATICA
fQ[n_] := PowerMod[2, n, n + 2] + 2 == n; Select[ Range[10^7], fQ] (* Robert G. Wilson v, Aug 02 2021 *)
PROG
(PARI) isok(n, k=2) = (k^n+n^k) % (n+k) == 0; \\ Michel Marcus, Oct 10 2013
(PARI) is(n)=Mod(2, n+2)^n==-4 \\ Charles R Greathouse IV, Oct 19 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Feb 22 2006
EXTENSIONS
a(9)-a(22) from Michel Marcus, Oct 10 2013
a(23)-a(34) from Hiroaki Yamanouchi, Sep 26 2015
STATUS
approved