Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Search: a005938 -id:a005938
     Sort: relevance | references | number | modified | created      Format: long | short | data
Fermat pseudoprimes to base 2, also called Sarrus numbers or Poulet numbers.
(Formerly M5441 N2365)
+10
363
341, 561, 645, 1105, 1387, 1729, 1905, 2047, 2465, 2701, 2821, 3277, 4033, 4369, 4371, 4681, 5461, 6601, 7957, 8321, 8481, 8911, 10261, 10585, 11305, 12801, 13741, 13747, 13981, 14491, 15709, 15841, 16705, 18705, 18721, 19951, 23001, 23377, 25761, 29341
OFFSET
1,1
COMMENTS
A composite number n is a Fermat pseudoprime to base b if and only if b^(n-1) == 1 (mod n). Fermat pseudoprimes to base 2 are often simply called pseudoprimes.
Theorem: If both numbers q and 2q - 1 are primes (q is in the sequence A005382) and n = q*(2q-1) then 2^(n-1) == 1 (mod n) (n is in the sequence) if and only if q is of the form 12k + 1. The sequence 2701, 18721, 49141, 104653, 226801, 665281, 721801, ... is related. This subsequence is also a subsequence of the sequences A005937 and A020137. - Farideh Firoozbakht, Sep 15 2006
Also, composite odd numbers n such that n divides 2^n - 2 (cf. A006935). It is known that all primes p divide 2^(p-1) - 1. There are only two known numbers n such that n^2 divides 2^(n-1) - 1, A001220(n) = {1093, 3511} Wieferich primes p: p^2 divides 2^(p-1) - 1. 1093^2 and 3511^2 are the terms of a(n). - Alexander Adamchuk, Nov 06 2006
An odd composite number 2n + 1 is in the sequence if and only if multiplicative order of 2 (mod 2n+1) divides 2n. - Ray Chandler, May 26 2008
The Carmichael numbers A002997 are a subset of this sequence. For the Sarrus numbers which are not Carmichael numbers, see A153508. - Artur Jasinski, Dec 28 2008
An odd number n greater than 1 is a Fermat pseudoprime to base b if and only if ((n-1)! - 1)*b^(n-1) == -1 (mod n). - Arkadiusz Wesolowski, Aug 20 2012
The name "Sarrus numbers" is after Frédéric Sarrus, who, in 1819, discovered that 341 is a counterexample to the "Chinese hypothesis" that n is prime if and only if 2^n is congruent to 2 (mod n). - Alonso del Arte, Apr 28 2013
The name "Poulet numbers" appears in Monografie Matematyczne 42 from 1932, apparently because Poulet in 1928 produced a list of these numbers (cf. Miller, 1975). - Felix Fröhlich, Aug 18 2014
Numbers n > 2 such that (n-1)! + 2^(n-1) == 1 (mod n). Composite numbers n such that (n-2)^(n-1) == 1 (mod n). - Thomas Ordowski, Feb 20 2016
The only twin pseudoprimes up to 10^13 are 4369, 4371. - Thomas Ordowski, Feb 12 2016
Theorem (A. Rotkiewicz, 1965): (2^p-1)*(2^q-1) is a pseudoprime if and only if p*q is a pseudoprime, where p,q are different primes. - Thomas Ordowski, Mar 31 2016
Theorem (W. Sierpiński, 1947): if n is a pseudoprime (odd or even), then 2^n-1 is a pseudoprime. - Thomas Ordowski, Apr 01 2016
If 2^n-1 is a pseudoprime, then n is a prime or a pseudoprime (odd or even). - Thomas Ordowski, Sep 05 2016
From Amiram Eldar, Jun 19 2021, Apr 21 2024: (Start)
Erdős (1950) called these numbers "almost primes".
According to Erdős (1949) and Piza (1954), the term "pseudoprime" was coined by D. H. Lehmer.
Named after the French mathematician Pierre de Fermat (1607-1665), or, alternatively, after the Belgian mathematician Paul Poulet (1887-1946), or, the French mathematician Pierre Frédéric Sarrus (1798-1861). (End)
REFERENCES
Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section A12, pp. 44-50.
George P. Loweke, The Lore of Prime Numbers. New York: Vantage Press (1982), p. 22.
Øystein Ore, Number Theory and Its History, McGraw-Hill, 1948.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..101629 [The pseudoprimes up to 10^12, from Richard Pinch's web site - see links below]
Jonathan Bayless and Paul Kinlaw, Explicit Bounds for the Sum of Reciprocals of Pseudoprimes and Carmichael Numbers, Journal of Integer Sequences, Vol. 20 (2017), Article 17.6.4.
Jens Bernheiden, Pseudoprimes (Text in German).
John Brillhart, N. J. A. Sloane, J. D. Swift, Correspondence, 1972.
Paul Erdős, On the converse of Fermat's theorem, The American Mathematical Monthly, Vol. 56, No. 9 (1949), pp. 623-624; alternative link.
Paul Erdős, On almost primes, Amer. Math. Monthly, Vol. 57, No. 6 (1950), pp. 404-407; alternative link.
William Galway, Tables of pseudoprimes and related data [Includes a file with pseudoprimes up to 2^64.]
Richard K. Guy, The strong law of small numbers. Amer. Math. Monthly, Vol. 95, No. 8 (1988), pp. 697-712. [Annotated scanned copy]
Paul Kinlaw, The reciprocal sums of pseudoprimes and Carmichael numbers, Mathematics of Computation (2023).
D. H. Lehmer, Guide to Tables in the Theory of Numbers, Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 48.
D. H. Lehmer, Errata for Poulet's table, Math. Comp., Vol. 25, No. 116 (1971), pp. 944-945.
D. H. Lehmer, Errata for Poulet's table. [annotated scanned copy]
Gérard P. Michon, Pseudoprimes.
J. C. P. Miller, On factorization, with a suggested new approach, Math. Comp., Vol. 29, No. 129 (1975), pp. 155-172. - Felix Fröhlich, Aug 18 2014
Robert Morris, Some observations on the converse of Fermat's theorem, unpublished memorandum, Oct 03 1973.
Richard Pinch, Pseudoprimes.
P. A. Piza, Fermat Coefficients, Mathematics Magazine, Vol. 27, No. 3 (1954), pp. 141-146.
Carl Pomerance & N. J. A. Sloane, Correspondence, 1991.
Paul Poulet, Tables des nombres composés vérifiant le théorème de Fermat pour le module 2 jusqu'à 100.000.000, Sphinx (Brussels), Vol. 8 (1938), pp. 42-45. [annotated scanned copy]
Andrzej Rotkiewicz, Sur les nombres pseudopremiers de la forme MpMq, Elemente der Mathematik, Vol. 20 (1965), pp. 108-109.
Waclaw Sierpiński, Remarque sur une hypothèse des Chinois concernant les nombres (2^n-2)/n, Colloquium Mathematicum, Vol. 1 (1947), p. 9.
Waclaw Sierpiński, Elementary Theory of Numbers, Państ. Wydaw. Nauk., Warszawa, 1964, p. 215.
Eric Weisstein's World of Mathematics, Chinese Hypothesis, Fermat Pseudoprime, Poulet Number, and Pseudoprime.
FORMULA
Sum_{n>=1} 1/a(n) is in the interval (0.015260, 33) (Bayless and Kinlaw, 2017). The upper bound was reduced to 0.0911 by Kinlaw (2023). - Amiram Eldar, Oct 15 2020, Feb 24 2024
MAPLE
select(t -> not isprime(t) and 2 &^(t-1) mod t = 1, [seq(i, i=3..10^5, 2)]); # Robert Israel, Feb 18 2016
MATHEMATICA
Select[Range[3, 30000, 2], ! PrimeQ[ # ] && PowerMod[2, (# - 1), # ] == 1 &] (* Farideh Firoozbakht, Sep 15 2006 *)
PROG
(PARI) q=1; vector(50, i, until( !isprime(q) & (1<<(q-1)-1)%q == 0, q+=2); q) \\ M. F. Hasler, May 04 2007
(PARI) is_A001567(n)={Mod(2, n)^(n-1)==1 && !isprime(n) && n>1} \\ M. F. Hasler, Oct 07 2012, updated to current PARI syntax and to exclude even pseudoprimes on Mar 01 2019
(Magma) [n: n in [3..3*10^4 by 2] | IsOne(Modexp(2, n-1, n)) and not IsPrime(n)]; // Bruno Berselli, Jan 17 2013
CROSSREFS
Cf. A001220 = Wieferich primes p: p^2 divides 2^(p-1) - 1.
Cf. A005935, A005936, A005937, A005938, A005939, A020136-A020228 (pseudoprimes to bases 3 through 100).
KEYWORD
nonn,nice
EXTENSIONS
More terms from David W. Wilson, Aug 15 1996
Replacement of broken geocities link by Jason G. Wurtzel, Sep 05 2010
"Poulet numbers" added to name by Joerg Arndt, Aug 18 2014
STATUS
approved
Pseudoprimes to base 3.
(Formerly M5362)
+10
44
91, 121, 286, 671, 703, 949, 1105, 1541, 1729, 1891, 2465, 2665, 2701, 2821, 3281, 3367, 3751, 4961, 5551, 6601, 7381, 8401, 8911, 10585, 11011, 12403, 14383, 15203, 15457, 15841, 16471, 16531, 18721, 19345, 23521, 24046, 24661, 24727, 28009, 29161
OFFSET
1,1
COMMENTS
Theorem: If q>3 and both numbers q and (2q-1) are primes then n=q*(2q-1) is a pseudoprime to base 3 (i.e. n is in the sequence). So for n>2, A005382(n)*(2*A005382(n)-1) is in the sequence (see Comments lines for the sequence A122780). 91,703,1891,2701,12403,18721,38503,49141... are such terms. This sequence is a subsequence of A122780. - Farideh Firoozbakht, Sep 13 2006
Composite numbers n such that 3^(n-1) == 1 (mod n).
Theorem (R. Steuerwald, 1948): if n is a pseudoprime to base b and gcd(n,b-1)=1, then (b^n-1)/(b-1) is a pseudoprime to base b. In particular, if n is an odd pseudoprime to base 3, then (3^n-1)/2 is a pseudoprime to base 3. - Thomas Ordowski, Apr 06 2016
Steuerwald's theorem can be strengthened by weakening his assumption as follows: if n is a weak pseudoprime to base b and gcd(n,b-1)=1, then ... - Thomas Ordowski, Feb 23 2021
REFERENCES
J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 91, p. 33, Ellipses, Paris 2008.
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..102839 (terms a(1)-a(798) from R. J. Mathar, a(799)-a(1000) from T. D. Noe)
C. Pomerance & N. J. A. Sloane, Correspondence, 1991
Rudolf Steuerwald, Über die Kongruenz a^(n-1) == 1 (mod n), Sitzungsber. math.-naturw. Kl. Bayer. Akad. Wiss. München, 1948, pp. 69-70.
Eric Weisstein's World of Mathematics, Fermat Pseudoprime
MATHEMATICA
base = 3; t = {}; n = 1; While[Length[t] < 100, n++; If[! PrimeQ[n] && PowerMod[base, n-1, n] == 1, AppendTo[t, n]]]; t (* T. D. Noe, Feb 21 2012 *)
PROG
(PARI) is_A005935(n)={Mod(3, n)^(n-1)==1 & !ispseudoprime(n) & n>1} \\ M. F. Hasler, Jul 19 2012
CROSSREFS
Pseudoprimes to other bases: A001567 (2), A005936 (5), A005937 (6), A005938 (7), A005939 (10).
Subsequence of A122780.
Cf. A005382.
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from David W. Wilson, Aug 15 1996
STATUS
approved
Pseudoprimes to base 5.
(Formerly M3712)
+10
20
4, 124, 217, 561, 781, 1541, 1729, 1891, 2821, 4123, 5461, 5611, 5662, 5731, 6601, 7449, 7813, 8029, 8911, 9881, 11041, 11476, 12801, 13021, 13333, 13981, 14981, 15751, 15841, 16297, 17767, 21361, 22791, 23653, 24211, 25327, 25351, 29341, 29539
OFFSET
1,1
COMMENTS
According to Karsten Meyer, 4 should be excluded, following the strict definition in Crandall and Pomerance. - May 16 2006
Theorem: If both numbers q and (2q - 1) are primes (q is in the sequence A005382) then n = q*(2q - 1) is a pseudoprime to base 5 (n is in the sequence) if and only if q is of the form 10k + 1. 1891, 88831, 146611, 218791, 721801, ... are such terms. This sequence is a subsequence of A122782. - Farideh Firoozbakht, Sep 14 2006
Composite numbers n such that 5^(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)
J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 124, p. 43, Ellipses, Paris 2008.
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..92893 (terms a(1)-a(776) from R. J. Mathar, a(777)-a(1000) from T. D. Noe)
C. Pomerance & N. J. A. Sloane, Correspondence, 1991
Eric Weisstein's World of Mathematics, Fermat Pseudoprime
MATHEMATICA
base = 5; t = {}; n = 1; While[Length[t] < 100, n++; If[! PrimeQ[n] && PowerMod[base, n-1, n] == 1, AppendTo[t, n]]]; t (* T. D. Noe, Feb 21 2012 *)
Select[Range[30000], CompositeQ[#]&&PowerMod[5, #-1, #]==1&] (* Harvey P. Dale, Jul 21 2023 *)
CROSSREFS
Pseudoprimes to other bases: A001567 (2), A005935 (3), A005937 (6), A005938 (7), A005939 (10).
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from David W. Wilson, Aug 15 1996
STATUS
approved
Smallest pseudoprime to base n, not necessarily exceeding n (cf. A007535).
+10
18
4, 341, 91, 15, 4, 35, 6, 9, 4, 9, 10, 65, 4, 15, 14, 15, 4, 25, 6, 21, 4, 21, 22, 25, 4, 9, 26, 9, 4, 49, 6, 25, 4, 15, 9, 35, 4, 39, 38, 39, 4, 205, 6, 9, 4, 9, 46, 49, 4, 21, 10, 51, 4, 55, 6, 15, 4, 57, 15, 341, 4, 9, 62, 9, 4, 65, 6, 25, 4, 69, 9, 85, 4, 15, 74, 15, 4, 77, 6, 9, 4, 9, 21, 85, 4, 15, 86, 87, 4, 91, 6
OFFSET
1,1
COMMENTS
If n-1 is composite, then a(n) < n. - Thomas Ordowski, Aug 08 2018
Conjecture: a(n) = A007535(n) for finitely many n. For n > 2; if a(n) > n, then n-1 is prime (find all these primes). - Thomas Ordowski, Aug 09 2018
It seems that if a(2^p) = p^2, then 2^p-1 is prime. - Thomas Ordowski, Aug 10 2018
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..10000 (first 1024 terms from Eric Chen)
Wikipedia, Pseudoprime
FORMULA
a(n) = LeastComposite{x; n^(x-1) mod x = 1}.
EXAMPLE
From Robert G. Wilson v, Feb 26 2015: (Start)
a(n) = 4 for n = 1 + 4*k, k >= 0.
a(n) = 6 for n = 7 + 12*k, k >= 0.
a(n) = 9 for n = 8 + 18*k, 10 + 18*k, 35 + 36*k, k >= 0.
(End)
a(n) = 10 for n = 51 + 60*k, 11 + 180*k, 131 + 180*k, k >= 0.
MATHEMATICA
f[n_] := Block[{k = 1}, While[ GCD[n, k] > 1 || PrimeQ[k] || PowerMod[n, k - 1, k] != 1, j = k++]; k]; Array[f, 91] (* Robert G. Wilson v, Feb 26 2015 *)
PROG
(PARI) /* a(n) <= 2000 is sufficient up to n = 10000 */
a(n) = for(k=2, 2000, if((n^(k-1))%k==1 && !isprime(k), return(k))) \\ Eric Chen, Feb 22 2015
(PARI) a(n) = {forcomposite(k=2, , if (Mod(n, k)^(k-1) == 1, return (k)); ); } \\ Michel Marcus, Mar 02 2015
KEYWORD
nonn
AUTHOR
Labos Elemer, Nov 25 2003
STATUS
approved
Strong pseudoprimes to base 7.
+10
15
25, 325, 703, 2101, 2353, 4525, 11041, 14089, 20197, 29857, 29891, 39331, 49241, 58825, 64681, 76627, 78937, 79381, 87673, 88399, 88831, 102943, 109061, 137257, 144901, 149171, 173951, 178709, 188191, 197633, 219781, 227767, 231793, 245281
OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..200 from R. J. Mathar)
Eric Weisstein's World of Mathematics, Strong Pseudoprime
KEYWORD
nonn
STATUS
approved
Even pseudoprimes to base 7.
+10
15
6, 16806, 29234, 67798, 791578, 1234806, 1807566, 2427706, 12562534, 29147626, 29783134, 38357866, 41716918, 50167486, 99392626, 111664666, 162474586, 169707826, 281780346, 286351066, 349880326, 423200566, 463054594, 479581642
OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..163 (terms below 10^12, calculated from the b-file at A005938; terms 1..37 from Robert G. Wilson v)
Eric Weisstein's World of Mathematics, Fermat Pseudoprime.
MATHEMATICA
lst = {}; Do[ If[ PowerMod[7, 2n - 1, 2n] == 1, AppendTo[lst, 2n]; Print[2n]], {n, 2, 24000000}]; lst (* Robert G. Wilson v, May 28 2007 *)
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, May 26 2007
EXTENSIONS
a(9)-a(37) from Robert G. Wilson v, May 28 2007
STATUS
approved
Pseudoprimes to base 7, written in base 7.
+10
7
6, 34, 643, 1431, 2023, 2245, 3136, 5215, 6061, 6601, 10121, 12361, 16123, 20032, 25345, 33155, 41545, 42601, 42652, 44122, 45406, 50026, 54561, 56035, 66522, 66666, 105403, 110254, 112612, 113345, 113356, 123616, 135206, 140011, 151142, 151354, 153022, 153101, 153352, 155554
OFFSET
1,1
LINKS
FORMULA
a(n) = A007093(A005938(n)).
MATHEMATICA
base = 7; t = {}; n = 1;
While[Length[t] < 40, n++;
If[! PrimeQ[n] && PowerMod[base, n - 1, n] == 1,
AppendTo[t, FromDigits@IntegerDigits[n, 7]]]]; t
FromDigits[IntegerDigits[#, 7]]&/@Select[Range[40000], CompositeQ[#] && PowerMod[ 7, #-1, #]==1&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Feb 24 2018 *)
PROG
(PARI) lista(nn, b=7) = {for (n=1, nn, if (Mod(b, n)^(n-1)==1 && !ispseudoprime(n) && n>1, print1(subst(Pol(digits(n, b), x), x, 10), ", "); ); ); } \\ Michel Marcus, Sep 30 2015
CROSSREFS
Cf. A005938 (pseudoprimes to base 7), A007093 (numbers in base 7).
KEYWORD
nonn,base
AUTHOR
Abdul Gaffar Khan, Sep 11 2015
STATUS
approved
Pseudoprimes to bases 2, 3, 5 and 7.
+10
5
29341, 46657, 75361, 115921, 162401, 252601, 294409, 314821, 334153, 340561, 399001, 410041, 488881, 512461, 530881, 552721, 658801, 721801, 852841, 1024651, 1152271, 1193221, 1461241, 1569457, 1615681, 1857241, 1909001, 2100901
OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..7469 (terms below 10^12; terms 1..114 from R. J. Mathar)
Jens Bernheiden, Pseudoprimes (in German).
FORMULA
a(n) = n-th positive integer k(>1) such that 2^(k-1) = 1 (mod k), 3^(k-1) = 1 (mod k), 5^(k-1) = 1 (mod k) and 7^(k-1) = 1 (mod k).
A005938 INTERSECT A083737. - R. J. Mathar, Feb 07 2008
EXAMPLE
a(1)=29341 since it is the first number such that 2^(k-1) = 1 (mod k), 3^(k-1) = 1 (mod k), 5^(k-1) = 1 (mod k) and 7^(k-1) = 1 (mod k).
MAPLE
a001567 := [] : f := fopen("b001567.txt", READ) : bfil := readline(f) : while StringTools[WordCount](bfil) > 0 do if StringTools[FirstFromLeft]("#", bfil ) <> 0 then ; else bfil := sscanf(bfil, "%d %d") ; a001567 := [op(a001567), op(2, bfil) ] ; fi ; bfil := readline(f) ; od: fclose(f) : isPsp := proc(n, b) if n>3 and not isprime(n) and b^(n-1) mod n = 1 then true; else false; fi; end: isA001567 := proc(n) isPsp(n, 2) ; end: isA005935 := proc(n) isPsp(n, 3) ; end: isA005936 := proc(n) isPsp(n, 5) ; end: isA005938 := proc(n) isPsp(n, 7) ; end: isA083739 := proc(n) if isA001567(n) and isA005935(n) and isA005936(n) and isA005938(n) then true ; else false ; fi ; end: n := 1: for psp2 from 1 do i := op(psp2, a001567) ; if isA083739(i) then printf("%d %d ", n, i) ; n :=n+1 ; fi ; od: # R. J. Mathar, Feb 07 2008
MATHEMATICA
Select[ Range[2113920], !PrimeQ[ # ] && PowerMod[2, # - 1, # ] == 1 && PowerMod[3, 1 - 1, # ] == 1 && PowerMod[5, # - 1, # ] == 1 && PowerMod[7, 1 - 1, # ] == 1 & ]
PROG
(PARI) is(n)=!isprime(n)&&Mod(2, n)^(n-1)==1&&Mod(3, n)^(n-1)==1&&Mod(5, n)^(n-1)==1&&Mod(7, n)^(n-1)==1 \\ Charles R Greathouse IV, Apr 12 2012
CROSSREFS
Proper subset of A083737.
KEYWORD
nonn
AUTHOR
Serhat Sevki Dincer (sevki(AT)ug.bilkent.edu.tr), May 05 2003
EXTENSIONS
Edited by Robert G. Wilson v, May 06 2003
STATUS
approved
Pseudoprimes to base 7 that are not squarefree.
+10
5
25, 325, 1825, 4525, 4825, 10225, 12025, 16725, 20425, 30025, 35425, 58825, 177025, 216525, 265525, 352225, 526825, 611425, 675925, 710425, 717025, 746425, 772525, 784225, 834025, 877825, 1125825, 1126225, 1439425, 1491025, 1579225, 1935025, 1973425, 2176525
OFFSET
1,1
COMMENTS
Any term is divisible by the square of a base 7 Wieferich prime (A123693).
Intersection of A005938 and A013929. - Michel Marcus, Aug 21 2014
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..3095 (terms below 10^12)
PROG
(PARI) forcomposite(n=1, 1e9, if(Mod(7, n)^(n-1)==1, if(!issquarefree(n), print1(n, ", "))))
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Aug 18 2014
STATUS
approved
Nonprimes k such that 7^k == 7 (mod k).
+10
4
1, 6, 14, 21, 25, 42, 105, 133, 231, 301, 325, 525, 561, 703, 817, 1105, 1729, 1825, 2101, 2353, 2465, 2821, 3277, 3325, 3486, 3913, 4011, 4525, 4825, 5565, 5719, 5901, 6601, 6697, 7525, 8321, 8911, 9331, 10225, 10325, 10585, 10621, 11041, 11521
OFFSET
1,2
COMMENTS
Theorem: If both numbers q and 2q-1 are primes then q*(2q-1) 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.
LINKS
MATHEMATICA
Select[Range[20000], ! PrimeQ[#] && PowerMod[7, #, #] == Mod[7, #] &]
With[{nn=12000}, Select[Complement[Range[nn], Prime[Range[PrimePi[ nn]]]], PowerMod[7, #, #]==Mod[7, #]&]] (* Harvey P. Dale, Jul 12 2012 *)
KEYWORD
nonn
AUTHOR
Farideh Firoozbakht, Sep 12 2006
STATUS
approved

Search completed in 0.018 seconds