OFFSET
1,1
COMMENTS
If q and 2q-1 are odd primes, then n=q*(2q-1) is in the sequence. So for n>1, A005382(n)*(2*A005382(n)-1) form a subsequence (cf. A129521). - Farideh Firoozbakht, Sep 12 2006
Primes q and 2q-1 are a Cunningham chain of the second kind. - Walter Nissen, Sep 07 2009
Composite numbers n such that 4^(n-1) == 1 (mod n). - Michel Lagneau, Feb 18 2012
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from T. D. Noe)
Chris Caldwell, Cunningham chain.
Chris Caldwell et al., Top Twenty Cunningham Chains (2nd kind).
Eric Weisstein's World of Mathematics, Fermat Pseudoprime.
MATHEMATICA
Select[Range[9200], ! PrimeQ[ # ] && PowerMod[4, # - 1, # ] == 1 &] (* Farideh Firoozbakht, Sep 12 2006 *)
PROG
(PARI) isok(n) = (Mod(4, n)^(n-1)==1) && !isprime(n) && (n>1); \\ Michel Marcus, Apr 27 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved