login
Search: a083737 -id:a083737
     Sort: relevance | references | number | modified | created      Format: long | short | data
Terms of A083737 which are not Carmichael numbers (A002997).
+20
4
721801, 873181, 4504501, 8646121, 9006401, 9863461, 10403641, 12322133, 14609401, 15913261, 18595801, 18736381, 20234341, 21397381, 22066201, 22369621, 22885129, 25326001, 25696133, 28312921, 36307981, 42702661
OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..2871 (calculated from the b-file at A083737)
MATHEMATICA
Select[Range[5*10^7], ! PrimeQ[ # ] && PowerMod[2, # - 1, # ] == 1 && PowerMod[3, # - 1, # ] == 1 && PowerMod[5, # - 1, # ] == 1 && Mod[ #, CarmichaelLambda[ # ]] != 1 &] (* Ray Chandler, Dec 28 2008 *)
KEYWORD
nonn
AUTHOR
STATUS
approved
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
Carmichael numbers: composite numbers k such that a^(k-1) == 1 (mod k) for every a coprime to k.
(Formerly M5462)
+10
348
561, 1105, 1729, 2465, 2821, 6601, 8911, 10585, 15841, 29341, 41041, 46657, 52633, 62745, 63973, 75361, 101101, 115921, 126217, 162401, 172081, 188461, 252601, 278545, 294409, 314821, 334153, 340561, 399001, 410041, 449065, 488881, 512461, 530881, 552721
OFFSET
1,1
COMMENTS
V. Šimerka found the first 7 terms of this sequence 25 years before Carmichael (see the link and also the remark of K. Conrad). - Peter Luschny, Apr 01 2019
k is composite and squarefree and for p prime, p|k => p-1|k-1.
An odd composite number k is a pseudoprime to base a iff a^(k-1) == 1 (mod k). A Carmichael number is an odd composite number k which is a pseudoprime to base a for every number a prime to k.
A composite odd number k is a Carmichael number if and only if k is squarefree and p-1 divides k-1 for every prime p dividing k. (Korselt, 1899)
Ghatage and Scott prove using Fermat's little theorem that (a+b)^k == a^k + b^k (mod k) (the freshman's dream) exactly when k is a prime (A000040) or a Carmichael number. - Jonathan Vos Post, Aug 31 2005
Alford et al. have constructed a Carmichael number with 10333229505 prime factors, and have also constructed Carmichael numbers with m prime factors for every m between 3 and 19565220. - Jonathan Vos Post, Apr 01 2012
Thomas Wright proved that for any numbers b and M in N with gcd(b,M) = 1, there are infinitely many Carmichael numbers k such that k == b (mod M). - Jonathan Vos Post, Dec 27 2012
Composite numbers k relatively prime to 1^(k-1) + 2^(k-1) + ... + (k-1)^(k-1). - Thomas Ordowski, Oct 09 2013
Composite numbers k such that A063994(k) = A000010(k). - Thomas Ordowski, Dec 17 2013
Odd composite numbers k such that k divides A002445((k-1)/2). - Robert Israel, Oct 02 2015
If k is a Carmichael number and gcd(b-1,k)=1, then (b^k-1)/(b-1) is a pseudoprime to base b by Steuerwald's theorem; see the reference in A005935. - Thomas Ordowski, Apr 17 2016
Composite numbers k such that p^k == p (mod k) for every prime p <= A285512(k). - Max Alekseyev and Thomas Ordowski, Apr 20 2017
If a composite m < A285549(n) and p^m == p (mod m) for every prime p <= prime(n), then m is a Carmichael number. - Thomas Ordowski, Apr 23 2017
The sequence of all Carmichael numbers can be defined as follows: a(1) = 561, a(n+1) = smallest composite k > a(n) such that p^k == p (mod k) for every prime p <= n+2. - Thomas Ordowski, Apr 24 2017
An integer m > 1 is a Carmichael number if and only if m is squarefree and each of its prime divisors p satisfies both s_p(m) >= p and s_p(m) == 1 (mod p-1), where s_p(m) is the sum of the base-p digits of m. Then m is odd and has at least three prime factors. For each prime factor p, the sharp bound p <= a*sqrt(m) holds with a = sqrt(17/33) = 0.7177.... See Kellner and Sondow 2019. - Bernd C. Kellner and Jonathan Sondow, Mar 03 2019
Carmichael numbers are special polygonal numbers A324973. The rank of the n-th Carmichael number is A324975(n). See Kellner and Sondow 2019. - Jonathan Sondow, Mar 26 2019
An odd composite number m is a Carmichael number iff m divides denominator(Bernoulli(m-1)). The quotient is A324977. See Pomerance, Selfridge, & Wagstaff, p. 1006, and Kellner & Sondow, section on Bernoulli numbers. - Jonathan Sondow, Mar 28 2019
This is setwise difference A324050 \ A008578. Many of the same identities apply also to A324050. - Antti Karttunen, Apr 22 2019
If k is a Carmichael number, then A309132(k) = A326690(k). The proof generalizes that of Theorem in A309132. - Jonathan Sondow, Jul 19 2019
Composite numbers k such that A111076(k)^(k-1) == 1 (mod k). Proof: the multiplicative order of A111076(k) mod k is equal to lambda(k), where lambda(k) = A002322(k), so lambda(k) divides k-1, qed. - Thomas Ordowski, Nov 14 2019
For all positive integers m, m^k - m is divisible by k, for all k > 1, iff k is either a Carmichael number or a prime, as is used in the proof by induction for Fermat's Little Theorem. Also related are A182816 and A121707. - Richard R. Forberg, Jul 18 2020
From Amiram Eldar, Dec 04 2020, Apr 21 2024: (Start)
Ore (1948) called these numbers "Numbers with the Fermat property", or, for short, "F numbers".
Also called "absolute pseudoprimes". According to Erdős (1949) this term was coined by D. H. Lehmer.
Named by Beeger (1950) after the American mathematician Robert Daniel Carmichael (1879 - 1967). (End)
For ending digit 1,3,5,7,9 through the first 10000 terms, we see 80.3, 4.1, 7.4, 3.8 and 4.3% apportionment respectively. Why the bias towards ending digit "1"? - Bill McEachen, Jul 16 2021
It seems that for any m > 1, the remainders of Carmichael numbers modulo m are biased towards 1. The number of terms congruent to 1 modulo 4, 6, 8, ..., 24 among the first 10000 terms: 9827, 9854, 8652, 8034, 9682, 5685, 6798, 7820, 7880, 3378 and 8518. - Jianing Song, Nov 08 2021
Alford, Granville and Pomerance conjectured in their 1994 paper that a statement analogous to Bertrand's Postulate could be applied to Carmichael numbers. This has now been proved by Daniel Larsen, see link below. - David James Sycamore, Jan 17 2023
REFERENCES
N. G. W. H. Beeger, On composite numbers n for which a^n == 1 (mod n) for every a prime to n, Scripta Mathematica, Vol. 16 (1950), pp. 133-135.
Albert H. Beiler, Recreations in the Theory of Numbers, Dover Publications, Inc. New York, 1966, Table 18, Page 44.
David M. Burton, Elementary Number Theory, 5th ed., McGraw-Hill, 2002.
CRC Standard Mathematical Tables and Formulae, 30th ed., 1996, p. 87.
Richard K. Guy, Unsolved Problems in Number Theory, A13.
Øystein Ore, Number Theory and Its History, McGraw-Hill, 1948, Reprinted by Dover Publications, 1988, Chapter 14.
Paul Poulet, Tables des nombres composés vérifiant le théorème du Fermat pour le module 2 jusqu'à 100.000.000, Sphinx (Brussels), 8 (1938), 42-45.
Wacław Sierpiński, A Selection of Problems in the Theory of Numbers. Macmillan, NY, 1964, p. 51.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See entry 561 at p. 157.
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..10000 (from the Pinch web site mentioned below)
W. R. Alford, Jon Grantham, Steven Hayman, and Andrew Shallue, Constructing Carmichael numbers through improved subset-product algorithms, Mathematics of Computation, Vol. 83, No. 286 (2014), pp. 899-915, arXiv preprint, arXiv:1203.6664v1 [math.NT], Mar 29 2012.
W. R. Alford, A. Granville, and C. Pomerance, There are infinitely many Carmichael numbers, Ann. of Math. (2) 139 (1994), no. 3, 703-722.
W. R. Alford, A. Granville, and C. Pomerance (1994). "On the difficulty of finding reliable witnesses". Lecture Notes in Computer Science 877, 1994, pp. 1-16.
François Arnault, Thesis.
François Arnault, Constructing Carmichael numbers which are strong pseudoprimes to several bases, Journal of Symbolic Computation, vol. 20, no 2, Aug. 1995, pp. 151-161.
François Arnault, Rabin-Miller primality test: Composite numbers which pass it, Mathematics of Computation, vol. 64, no 209, 1995, pp. 355-361.
François Arnault, The Rabin-Monier theorem for Lucas pseudoprimes, Mathematics of Computation, vol. 66, no 218, April 1997, pp. 869-881.
Eric Bach and Rex Fernando, Infinitely Many Carmichael Numbers for a Modified Miller-Rabin Prime Test, ISSAC '16: Proceedings of the ACM on International Symposium on Symbolic and Algebraic Computation, July 2016, pp. 47-54, arXiv preprint, arXiv:1512.00444 [math.NT], 2015.
Sunghan Bae, Su Hu, and Min Sha, On the Carmichael rings, Carmichael ideals and Carmichael polynomials, arXiv:1809.05432 [math.NT], 2018.
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.
John D. Brillhart, N. J. A. Sloane, and J. D. Swift, Correspondence, 1972.
Ronald Joseph Burthe, Jr. Upper bounds for least witnesses and generating sets, Acta Arith. 80 (1997), no. 4, 311-326.
C. K. Caldwell, The Prime Glossary, Carmichael number.
R. D. Carmichael, Note on a new number theory function, Bull. Amer. Math. Soc. 16 (1910), 232-238.
Keith Conrad, Carmichael numbers and Korselt's criterion, expository paper (2016), 1-3.
K. A. Draziotis, V. Martidis, and S. Tiganourias, Product Subset Problem: Applications to number theory and cryptography, arXiv:2002.07095 [math.NT], 2020. See also Chapter 5, Analysis, Cryptography and Information Science, World Scientific (2023), p. 108.
Harvey Dubner, Carmichael Numbers of the form (6m+1)(12m+1)(18m+1), Journal of Integer Sequences, Vol. 5 (2002) Article 02.2.1.
James Emery, Number Theory, 2013. [Broken link]
Paul Erdős, On the converse of Fermat's theorem, The American Mathematical Monthly, Vol. 56, No. 9 (1949), pp. 623-624; alternative link.
Jan Feitsma and William Galway, Tables of pseudoprimes and related data.
Pratibha Ghatage and Brian Scott, Exactly When is (a+b)^n == a^n + b^n (mod n)?, College Mathematics Journal, Vol. 36, No. 4 (Sep 2005), p. 322.
Claude Goutier, Compressed text file carm10e22.7z containing all the Carmichael numbers up to 10^22. [Local copy, with permission. This is a very large file.]
Andrew Granville, Papers on Carmichael numbers.
Andrew Granville, Primality testing and Carmichael numbers, Notices Amer. Math. Soc., 39 (No. 7, 1992), 696-700.
Andrew Granville and Carl Pomerance, Two contradictory conjectures concerning Carmichael numbers, Math. Comp. 71 (2002), no. 238, 883-908.
Gerhard Jaeschke, The Carmichael numbers to 10^12, Math. Comp., Vol. 55, No. 191 (1990), pp. 383-389.
Eugene Karolinsky and Dmytro Seliutin, Carmichael numbers for GL(m), arXiv:2001.10315 [math.NT], 2020.
Bernd C. Kellner, On primary Carmichael numbers, Integers 22 (2022), #A38, 39 pp.; arXiv:1902.11283 [math.NT], 2019.
Bernd C. Kellner and Jonathan Sondow, On Carmichael and polygonal numbers, Bernoulli polynomials, and sums of base-p digits, Integers 21 (2021), #A52, 21 pp.; arXiv:1902.10672 [math.NT], 2019.
Paul Kinlaw, The reciprocal sums of pseudoprimes and Carmichael numbers, Mathematics of Computation (2023).
A. Korselt, G. Tarry, I. Franel, and G. Vacca, Problème chinois, L'intermédiaire des mathématiciens 6 (1899), 142-144.
Daniel Larsen, Bertrand's Postulate for Carmichael Numbers, arXiv:2111.06963 [math.NT], 2021.
D. H. Lehmer, Errata for Poulet's table, Math. Comp., 25 (1971), 944-945. 25 944 1971.
Max Lewis and Victor Scharaschkin, k-Lehmer and k-Carmichael Numbers, Integers, 16 (2016), #A80.
Romeo Meštrović, Generalizations of Carmichael numbers I, arXiv:1305.1867v1 [math.NT], May 04 2013.
Romeo Meštrović, On a Congruence Modulo n^3 Involving Two Consecutive Sums of Powers, Journal of Integer Sequences, Vol. 17 (2014), 14.8.4.
Yoshio Mimura, Carmichael Numbers up to 10^12. [broken link, WayBackMachine]
Math Reference Project, Carmichael Numbers.
R. G. E. Pinch, The Carmichael numbers up to 10^18, 2008.
R. G. E. Pinch, Carmichael numbers up to 10^15, 10^16, 10^16 to 10^17, 10^17 to 10^18, 10^19, and 10^21.
Carl Pomerance, J. L. Selfridge, and Samuel S. Wagstaff, Jr., The pseudoprimes to 25*10^9, Math. Comp., Vol. 35, No. 151 (1980), pp. 1003-1026.
Carl Pomerance and N. J. A. Sloane, Correspondence, 1991.
Václav Šimerka, Zbytky z arithmetické posloupnosti, (On the remainders of an arithmetic progression), Časopis pro pěstování matematiky a fysiky. 14 (1885), 221-225.
Eric Weisstein's World of Mathematics, Carmichael Number, Knoedel Numbers, and Pseudoprime.
Wikipedia, Carmichael number.
Thomas Wright, Infinitely many Carmichael numbers in arithmetic progressions, Bulletin of the London Mathematical Society, 45 (2013) 943-952, arXiv preprint, arXiv:1212.5850 [math.NT], Dec 2012.
FORMULA
Sum_{n>=1} 1/a(n) is in the interval (0.004706, 27.8724) (Bayless and Kinlaw, 2017). The upper bound was reduced to 0.0058 by Kinlaw (2023). - Amiram Eldar, Oct 26 2020, Feb 24 2024
MAPLE
filter:= proc(n)
local q;
if isprime(n) then return false fi;
if 2 &^ (n-1) mod n <> 1 then return false fi;
if not numtheory:-issqrfree(n) then return false fi;
for q in numtheory:-factorset(n) do
if (n-1) mod (q-1) <> 0 then return false fi
od:
true;
end proc:
select(filter, [seq(2*k+1, k=1..10^6)]); # Robert Israel, Dec 29 2014
isA002997 := n -> 0 = modp(n-1, numtheory:-lambda(n)) and not isprime(n) and n <> 1:
select(isA002997, [$1..10000]); # Peter Luschny, Jul 21 2019
MATHEMATICA
Cases[Range[1, 100000, 2], n_ /; Mod[n, CarmichaelLambda[n]] == 1 && ! PrimeQ[n]] (* Artur Jasinski, Apr 05 2008; minor edit from Zak Seidov, Feb 16 2011 *)
Select[Range[1, 600001, 2], CompositeQ[#]&&Mod[#, CarmichaelLambda[#]]==1&] (* Harvey P. Dale, Jul 08 2023 *)
PROG
(PARI) Korselt(n)=my(f=factor(n)); for(i=1, #f[, 1], if(f[i, 2]>1||(n-1)%(f[i, 1]-1), return(0))); 1
isA002997(n)=n%2 && !isprime(n) && Korselt(n) && n>1 \\ Charles R Greathouse IV, Jun 10 2011
(PARI) is_A002997(n, F=factor(n)~)={ #F>2 && !foreach(F, f, (n%(f[1]-1)==1 && f[2]==1) || return)} \\ No need to check parity: if efficiency is needed, scan only odd numbers. - M. F. Hasler, Aug 24 2012, edited Mar 24 2022
(Haskell)
a002997 n = a002997_list !! (n-1)
a002997_list = [x | x <- a024556_list,
all (== 0) $ map ((mod (x - 1)) . (subtract 1)) $ a027748_row x]
-- Reinhard Zumkeller, Apr 12 2012
(Magma) [n: n in [3..53*10^4 by 2] | not IsPrime(n) and n mod CarmichaelLambda(n) eq 1]; // Bruno Berselli, Apr 23 2012
(Sage)
def isCarmichael(n):
if n == 1 or is_even(n) or is_prime(n):
return False
factors = factor(n)
for f in factors:
if f[1] > 1: return False
if (n - 1) % (f[0] - 1) != 0:
return False
return True
print([n for n in (1..20000) if isCarmichael(n)]) # Peter Luschny, Apr 02 2019
(Python)
from itertools import islice
from sympy import nextprime, factorint
def A002997_gen(): # generator of terms
p, q = 3, 5
while True:
for n in range(p+2, q, 2):
f = factorint(n)
if max(f.values()) == 1 and not any((n-1) % (p-1) for p in f):
yield n
p, q = q, nextprime(q)
A002997_list = list(islice(A002997_gen(), 20)) # Chai Wah Wu, May 11 2022
KEYWORD
nonn,nice
EXTENSIONS
Links for lists of Carmichael numbers updated by Jan Kristian Haugland, Mar 25 2009 and Danny Rorabaugh, May 05 2017
STATUS
approved
Pseudoprimes to both base 2 and base 3, i.e., intersection of A001567 and A005935.
+10
12
1105, 1729, 2465, 2701, 2821, 6601, 8911, 10585, 15841, 18721, 29341, 31621, 41041, 46657, 49141, 52633, 63973, 75361, 83333, 83665, 88561, 90751, 93961, 101101, 104653, 107185, 115921, 126217, 162401, 172081, 176149, 188461
OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 (first 201 terms from R. J. Mathar)
MATHEMATICA
Select[ Range[228240], !PrimeQ[ # ] && PowerMod[2, # - 1, # ] == 1 && PowerMod[3, # - 1, # ] == 1 &]
PROG
(PARI) is(n)=!isprime(n)&&Mod(2, n)^(n-1)==1&&Mod(3, n)^(n-1)==1 \\ Charles R Greathouse IV, Apr 12 2012
CROSSREFS
KEYWORD
nice,nonn
AUTHOR
Harvey P. Dale, Jan 24 2000
STATUS
approved
Least pseudoprime to base 2 through base prime(n).
+10
10
341, 1105, 1729, 29341, 29341, 162401, 252601, 252601, 252601, 252601, 252601, 252601, 1152271, 2508013, 2508013, 3828001, 3828001, 3828001, 3828001, 3828001, 3828001, 3828001, 3828001, 3828001, 3828001, 6733693, 6733693, 6733693
OFFSET
1,1
COMMENTS
Records: 341, 1105, 1729, 29341, 162401, 252601, 1152271, 2508013, 3828001, 6733693, 17098369, 17236801, 29111881, 82929001, 172947529, 216821881, 228842209, 366652201, .... - Robert G. Wilson v, May 11 2012
Conjecture: for n > 1, a(n) is the smallest Carmichael number k with lpf(k) > prime(n). It seems that such Carmichael numbers have exactly three prime factors. - Thomas Ordowski, Apr 18 2017
The conjecture is true if a(n) < A285549(n) for all n > 1. It holds for all a(n) < 2^64. - Max Alekseyev and Thomas Ordowski, Mar 13 2018
If prime(n) < m < a(n), then m is prime if and only if p^(m-1) == 1 (mod m) for every prime p <= prime(n). - Thomas Ordowski, Mar 05 2018
By this conjecture in the second comment, a(n) <= A135720(n+1), with equality for n > 1 iff a(n) < a(n+1), namely for n = 2, 3, 5, 6, 12, 13, 15, 25, 28, 29, ... For such n, a(n) gives all terms of A300629 > 561. - Thomas Ordowski, Mar 10 2018
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..1000 (first 100 terms from Robert G. Wilson v)
MATHEMATICA
k = 4; Do[l = Table[ Prime[i], {i, 1, n}]; While[ PrimeQ[k] || Union[PowerMod[l, k - 1, k]] != {1}, k++ ]; Print[k], {n, 1, 29}]
PROG
(PARI) isps(k, n) = {if (isprime(k), return (0)); my(nbok = 0); for (b=2, prime(n), if (Mod(b, k)^(k-1) == 1, nbok++, break)); if (nbok==prime(n)-1, return (1)); }
a(n) = {my(k=2); while (!isps(k, n), k++); return (k); } \\ Michel Marcus, Apr 27 2018
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, May 06 2003
STATUS
approved
Smallest Fermat pseudoprime k to all bases b = 2, 3, 4, ..., n.
+10
6
341, 1105, 1105, 1729, 1729, 29341, 29341, 29341, 29341, 29341, 29341, 162401, 162401, 162401, 162401, 252601, 252601, 252601, 252601, 252601, 252601, 252601, 252601, 252601, 252601, 252601, 252601, 252601, 252601, 252601, 252601, 252601, 252601, 252601, 252601, 252601, 252601, 252601, 252601
OFFSET
2,1
COMMENTS
a(n) is the smallest composite k such that b^(k-1) == 1 (mod (b-1)k) for every b = 2, 3, 4, ..., n. For more comments, see A083876 and A300629. - Max Alekseyev and Thomas Ordowski, Apr 29 2018
PROG
(PARI) a(n) = forcomposite(c=1, , my(i=0); for(b=2, n, if(Mod(b, c)^(c-1)==1, i++)); if(i==n-1, return(c)));
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Apr 02 2016
EXTENSIONS
Edited by Thomas Ordowski, Apr 29 2018
Corrected a typo within the initial terms by Jens Ahlström, Apr 23 2024
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
Number of Fermat pseudoprimes to bases 2, 3 and 5 less than 10^n.
+10
4
0, 0, 0, 4, 11, 36, 95, 257, 685, 1747, 4405, 10601, 25991, 63589, 156965, 387971, 973753, 2471133, 6340799
OFFSET
1,4
MATHEMATICA
Table[Count[Select[Range[2, 10^6], ! PrimeQ[#] && PowerMod[2, # - 1, #] == 1 && PowerMod[3, # - 1, #] == 1 && PowerMod[5, # - 1, #] == 1 &], x_ /; x < 10^n], {n, 6}] (* Robert Price, Jun 09 2019 *)
CROSSREFS
Cf. A083737.
KEYWORD
nonn,more
AUTHOR
Eric W. Weisstein, Nov 18 2005
EXTENSIONS
a(9)-a(19) from Amiram Eldar, Apr 16 2022
STATUS
approved
Pseudoprimes to bases 2,3,5 and 7 which are not Carmichael numbers (A002997).
+10
4
721801, 8646121, 10403641, 22885129, 36307981, 42702661, 46094401, 48064021, 52204237, 79398901, 80918281, 81954133, 114329881, 116151661, 143168581, 170782921, 188985961, 217145881, 220531501, 282707461, 299671921, 303373801, 326695141, 353815801, 361307521
OFFSET
1,1
COMMENTS
Terms congruent to 5 (mod 6): 468950021, 493108481, 659846021, 5936122901, 8144063621, ... - Robert G. Wilson v, Sep 03 2014
Terms not congruent to 1 (mod 12): 468950021, 493108481, 643767931, 659846021, 773131927, 5779230451, 5936122901, 7294056727, 8144063621, 9671001451, ... - Robert G. Wilson v, Sep 03 2014
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..1077 (terms 1..125 from Robert G. Wilson v)
MATHEMATICA
fQ[n_] := ! PrimeQ[n] && PowerMod[2, n - 1, n] == 1 && PowerMod[3, n - 1, n] == 1 && PowerMod[5, n - 1, n] == 1 && PowerMod[7, n - 1, n] == 1 && Mod[n, CarmichaelLambda[n]] != 1; Select[ Range[ 365000000], fQ] (* Ray Chandler, Dec 28 2008; corrected by Robert G. Wilson v, Sep 01 2014 *)
KEYWORD
nonn
AUTHOR
EXTENSIONS
Terms a(8) and onward from Robert G. Wilson v, Sep 01 2014
STATUS
approved
Carmichael numbers of the form (6*k + 1)*(24*k + 1)*(30*k + 1).
+10
3
126217, 68154001, 1828377001, 3713287801, 27388362001, 32071969801, 63593140801, 113267783377, 122666876401, 193403531401, 227959335001, 246682590001, 910355497801, 1389020532001, 4790779641001, 5367929037001, 6486222838801, 24572944746001
OFFSET
1,1
COMMENTS
These numbers:
- are pseudoprimes to bases 2, 3 and 5;
- do not occur in A097130 (Carmichael numbers that are not == 1 mod 24).
The number (6*k + 1)*(24*k + 1)*(30*k + 1) is in the sequence if:
- k is congruent to 5 mod 10;
- its three factors are all prime.
PROG
(Magma) [a : k in [1..1785 by 2] | IsOne(a mod CarmichaelLambda(a)) where a is (6*k+1)*(24*k+1)*(30*k+1)]
CROSSREFS
Subsequence of A002997 and of A083737.
Supersequence of A230746.
KEYWORD
nonn
AUTHOR
STATUS
approved

Search completed in 0.019 seconds