OFFSET
1,2
COMMENTS
Closed under multiplication: if x and y are terms then so is x*y.
The number (3^k-1)/2 is a term of this sequence if and only if k is a term. - Thomas Ordowski, Jul 25 2024
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
MATHEMATICA
Join[{1}, Select[Range[3100], PowerMod[3, #, #]==1&]] (* Harvey P. Dale, Nov 01 2024 *)
PROG
(PARI) is(n)=Mod(3, n)^n==1 \\ Charles R Greathouse IV, Aug 01 2016
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, Mar 05 2002
STATUS
approved