OFFSET
1,1
COMMENTS
Also composite numbers k such that (2^k - 2)/3 + 1 == 2^k - 1 == 1 (mod k).
An equivalent definition of this sequence: pseudoprimes to base 2 that are not divisible by 3. - Arkadiusz Wesolowski, Nov 15 2011
Conjecture: these are composites k such that 2^M(k-1) == -1 (mod M(k)^2 + M(k) + 1), where M(k) = 2^k - 1. - Amiram Eldar and Thomas Ordowski, Dec 19 2019
These are composites k such that 2^(m-1) == 1 (mod (m+1)^6 - 1), where m = 2^k - 1. - Thomas Ordowski, Sep 17 2023
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
MATHEMATICA
a[0] = 0; a[1] = 1; a[n_] := a[n] = a[n - 1] + 2a[n - 2]; Select[ Range[50000], IntegerQ[a[ # - 1]/ # ] && !PrimeQ[ # ] && # != 1 & ]
fQ[n_] := ! PrimeQ@ n && Mod[((2^n - 2)/3 + 1), n] == Mod[2^n - 1, n] == 1; Select[ Range@ 35000, fQ]
PROG
(PARI) is(n)=n%3 && Mod(2, n)^(n-1)==1 && !isprime(n) && n>1 \\ Charles R Greathouse IV, Sep 18 2013
(Magma) [k:k in [4..40000]|not IsPrime(k) and ((2^(k-1) + (-1)^k) div 3) mod k eq 0]; // Marius A. Burtea, Dec 20 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Robert G. Wilson v, Jan 03 2002
STATUS
approved