OFFSET
1,2
COMMENTS
a(17) = 561 is the first composite number in the sequence. - Charles R Greathouse IV, Sep 19 2012
LINKS
V. Raman and Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 (first 2000 terms from V. Raman)
Mersenne Forum, Prime Conjecture
MATHEMATICA
Select[Range[1, 10000], Mod[2^# - 2, # (# + 1)] == 0 &] (* T. D. Noe, Sep 19 2012 *)
Join[{1}, Select[Range[3000], PowerMod[2, #, #(#+1)]==2&]] (* Harvey P. Dale, Oct 05 2022 *)
PROG
(PARI) is(n)=Mod(2, n*(n+1))^n==2; \\ Charles R Greathouse IV, Sep 19 2012
(Python)
A216822_list = [n for n in range(1, 10**6) if n == 1 or pow(2, n, n*(n+1)) == 2] # Chai Wah Wu, Mar 25 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
V. Raman, Sep 17 2012
EXTENSIONS
a(1)=1 prepended by Max Alekseyev, Dec 29 2017
STATUS
approved