OFFSET
1,1
COMMENTS
According to Karsten Meyer, May 16 2006, 6 should be excluded, following the strict definition in Crandall and Pomerance.
Theorem: If both numbers q & 2q-1 are primes(q is in the sequence A005382) and n=q*(2q-1) then 7^(n-1)==1 (mod 7)(n is in the sequence) iff q=2 or mod(q,14) is in the set {1, 5, 13}. 6,703,18721,38503,88831,104653,146611,188191,... are such terms. This sequence is a subsequence of A122784. - Farideh Firoozbakht, Sep 14 2006
Composite numbers n such that 7^(n-1) == 1 (mod n).
REFERENCES
R. Crandall and C. Pomerance, "Prime Numbers - A Computational Perspective", Second Edition, Springer Verlag 2005, ISBN 0-387-25282-7 Page 132 (Theorem 3.4.2. and Algorithm 3.4.3)
R. K. Guy, Unsolved Problems in Number Theory, A12.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
R. J. Mathar, T. D. Noe and Hiroaki Yamanouchi, Table of n, a(n) for n = 1..87448 (terms a(1)-a(697) from R. J. Mathar, a(698)-a(1000) from T. D. Noe)
J. Bernheiden, Pseudoprimes (Text in German)
C. Pomerance & N. J. A. Sloane, Correspondence, 1991
F. Richman, Primality testing with Fermat's little theorem
MATHEMATICA
Select[Range[31000], ! PrimeQ[ # ] && PowerMod[7, (# - 1), # ] == 1 &] (* Farideh Firoozbakht, Sep 14 2006 *)
PROG
(Python)
from sympy import isprime
def ok(n): return pow(7, n-1, n) == 1 and not isprime(n)
print(list(filter(ok, range(1, 34000)))) # Michael S. Branicky, Jun 25 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
editing