cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-8 of 8 results.

A002997 Carmichael numbers: composite numbers k such that a^(k-1) == 1 (mod k) for every a coprime to k.

Original entry on oeis.org

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

Views

Author

Keywords

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.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 142.
  • 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.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 22, 100-103.
  • 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).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 145-146.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See entry 561 at p. 157.

Crossrefs

Programs

  • 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
    
  • 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 *)
  • 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
    
  • 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
  • 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
    

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

Extensions

Links for lists of Carmichael numbers updated by Jan Kristian Haugland, Mar 25 2009 and Danny Rorabaugh, May 05 2017

A006931 Least Carmichael number with n prime factors, or 0 if no such number exists.

Original entry on oeis.org

561, 41041, 825265, 321197185, 5394826801, 232250619601, 9746347772161, 1436697831295441, 60977817398996785, 7156857700403137441, 1791562810662585767521, 87674969936234821377601, 6553130926752006031481761, 1590231231043178376951698401
Offset: 3

Views

Author

Keywords

Comments

Alford, Grantham, Hayman, & Shallue construct large Carmichael numbers, finding upper bounds for a(3)-a(19565220) and a(10333229505). - Charles R Greathouse IV, May 30 2013

References

  • J.-P. Delahaye, Merveilleux nombres premiers ("Amazing primes"), p. 269, Pour la Science, Paris 2000.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    (* Program not suitable to compute more than a few terms *)
    A2997 = Select[Range[1, 10^6, 2], CompositeQ[#] && Mod[#, CarmichaelLambda[#] ] == 1&];
    (First /@ Split[Sort[{PrimeOmega[#], #}& /@ A2997], #1[[1]] == #2[[1]]&])[[All, 2]] (* Jean-François Alcover, Sep 11 2018 *)
  • PARI
    Korselt(n,f=factor(n))=for(i=1,#f[,1],if(f[i,2]>1||(n-1)%(f[i,1]-1),return(0)));1
    a(n)=my(p=2,f);forprime(q=3,default(primelimit),forstep(k=p+2,q-2,2,f=factor(k);if(vecmax(f[,2])==1 && #f[,2]==n && Korselt(k,f), return(k)));p=q)
    \\ Charles R Greathouse IV, Apr 25 2012
    
  • PARI
    carmichael(A, B, k) = A=max(A, vecprod(primes(k+1))\2); (f(m, l, lo, k) = my(list=List()); my(hi=sqrtnint(B\m, k)); if(lo > hi, return(list)); if(k==1, lo=max(lo, ceil(A/m)); my(t=lift(1/Mod(m,l))); while(t < lo, t += l); forstep(p=t, hi, l, if(isprime(p), my(n=m*p); if((n-1)%(p-1) == 0, listput(list, n)))), forprime(p=lo, hi, if(gcd(m, p-1) == 1, list=concat(list, f(m*p, lcm(l, p-1), p+1, k-1))))); list); vecsort(Vec(f(1, 1, 3, k)));
    a(n) = if(n < 3, return()); my(x=vecprod(primes(n+1))\2,y=2*x); while(1, my(v=carmichael(x,y,n)); if(#v >= 1, return(v[1])); x=y+1; y=2*x); \\ Daniel Suteu, Feb 24 2023

Extensions

Corrected by Lekraj Beedassy, Dec 31 2002
More terms from Ralf Stephan, from the Pinch paper, Apr 16 2005
Edited by N. J. A. Sloane, May 16 2008 at the suggestion of R. J. Mathar.
Escape clause added by Jianing Song, Dec 12 2021

A135720 a(n) is the smallest Carmichael number (A002997) with the n-th prime as its smallest prime divisor, or 0 if no such number exists.

Original entry on oeis.org

561, 1105, 1729, 75361, 29341, 162401, 334153, 1615681, 3581761, 399001, 294409, 252601, 1152271, 104569501, 2508013, 178837201, 6189121, 10267951, 10024561, 14469841, 4461725581, 985052881, 19384289, 23382529, 3828001, 90698401, 84350561, 6733693, 17098369
Offset: 2

Views

Author

Artur Jasinski, Nov 25 2007

Keywords

Examples

			a(2) = 561 because the smallest prime divisor of 561 is 3 which is the second prime.
		

Crossrefs

Extensions

Two missing terms and terms up to a(447) added by Donovan Johnson, Dec 25 2013
a(448)-a(615) in b-file from Max Alekseyev, Mar 11 2018
Escape clause added by Jianing Song, Dec 12 2021

A135721 a(n) is the smallest Carmichael number (A002997) divisible by the n-th prime, or 0 if no such number exists.

Original entry on oeis.org

561, 1105, 1729, 561, 1105, 561, 1729, 6601, 2465, 2821, 29341, 6601, 334153, 62745, 2433601, 74165065, 29341, 8911, 10024561, 10585, 2508013, 55462177, 62745, 46657, 101101, 52633, 84350561, 188461, 278545, 1152271, 18307381, 410041, 2628073, 12261061, 838201
Offset: 2

Views

Author

Artur Jasinski, Nov 25 2007

Keywords

Examples

			561 is the first Carmichael number and its prime factors are 3, 11, 17 (2nd, 5th and 7th primes), so a(2), a(5) and a(7) are equal to 561. - _Michel Marcus_, Nov 07 2013
		

Crossrefs

Programs

  • Mathematica
    c = Cases[Range[1, 10000000, 2], n_ /; Mod[n, CarmichaelLambda@ n] == 1 && ! PrimeQ@ n]; Table[First@ Select[c, Mod[#, Prime@ n] == 0 &], {n, 2, 16}] (* Michael De Vlieger, Aug 28 2015, after Artur Jasinski at A002997 *)
  • 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
    a(n) = my(pn=prime(n),cn = 31*pn); until (isA002997(cn+=2*pn),); cn; \\ Michel Marcus, Nov 07 2013, improved by M. F. Hasler, Apr 14 2015
    
  • 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
    a(n,p=prime(n))=my(m=lift(Mod(1/p,p-1)),c=max(m,33)*p,mp=m*p); while(!isprime(c) && !Korselt(c), c+=mp); c \\ Charles R Greathouse IV, Apr 15 2015

Extensions

More terms from Michel Marcus, Nov 07 2013
Escape clause added by Jianing Song, Dec 12 2021

A141710 Least prime factor of n-th Carmichael number A002997(n).

Original entry on oeis.org

3, 5, 7, 5, 7, 7, 7, 5, 7, 13, 7, 13, 7, 3, 7, 11, 7, 13, 7, 17, 7, 7, 41, 5, 37, 13, 19, 13, 31, 41, 5, 37, 31, 13, 13, 3, 11, 7, 7, 5, 7, 11, 7, 19, 7, 5, 7, 43, 31, 37, 17, 23, 7, 31, 41, 11, 19, 17, 13, 53, 5, 7, 11, 43, 13, 5, 29, 5, 101, 53, 7, 13, 11, 7, 19, 31, 41, 13, 29, 31, 5
Offset: 1

Views

Author

M. F. Hasler, Jul 01 2008

Keywords

Comments

All terms of this sequence are odd primes. See A002997 for references.

Examples

			a(1)=3 since A002997(1)=3*11*17.
		

Crossrefs

Programs

  • Mathematica
    CarmichaelQ[n_] := Not[PrimeQ[n]] && Divisible[n - 1, CarmichaelLambda[n]]; FactorInteger[#][[1, 1]]& /@ Select[Range[4, 10^7], CarmichaelQ] (* Jean-François Alcover, Sep 23 2011 *)
  • PARI
    A141710(n)=vecmin(factor(A002997(n))[,1]) /* where A002997(n) can be defined as follows: */ system("wget b002997.txt; sed -e 's/^[0-9]*//' b002997.gp"); A2997=readvec("b002997.gp"); A002997(n)=A2997[n]; \

Formula

a(n) = A020639(A002997(n))

A135719 a(n) is the index of the smallest Carmichael number (A002997) with n prime divisors, or 0 if no such number exists.

Original entry on oeis.org

1, 11, 40, 403, 1224, 4886, 19096, 120137, 485941, 2974628, 25293838
Offset: 3

Views

Author

Artur Jasinski, Nov 25 2007

Keywords

Crossrefs

Formula

A002997(a(n)) = A006931(n). - M. F. Hasler, Apr 14 2015

Extensions

a(8)-a(11) from Donovan Johnson, Feb 23 2012
a(12) from Amiram Eldar, Jul 08 2019
Escape clause added by Jianing Song, Dec 12 2021
a(13) calculated using data from Claude Goutier and added by Amiram Eldar, Apr 20 2024

A272772 Number of prime divisors of (A002997(n) - 2) counted with multiplicity.

Original entry on oeis.org

2, 1, 2, 2, 1, 1, 2, 2, 2, 1, 1, 4, 1, 1, 3, 2, 3, 2, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 3, 2, 1, 3, 2, 2, 1, 3, 1, 2, 3, 3, 4, 3, 2, 1, 2, 3, 2, 2, 2, 3, 3, 2, 2, 4, 1, 3, 3, 2, 4, 3, 2, 2, 2, 1, 2, 2, 3, 3, 2, 2, 2, 2, 4, 2, 1, 2, 2, 4, 2, 2, 2, 1, 3, 3, 2, 2, 2, 2, 3, 3, 2, 2, 3, 2, 1, 2, 2, 2, 4, 2, 2, 2, 4, 2
Offset: 1

Views

Author

Altug Alkan, May 06 2016

Keywords

Comments

62756641 is the first Carmichael number k such that k-2 has 5 prime divisors (counted with multiplicity).
What is the average value function of a(n) when n goes to infinity?
If these number act like typical numbers of their size, then standard heuristics suggest an average value of log log n since there are between x^(1/3) and x Carmichael numbers up to x for large enough x. - Charles R Greathouse IV, May 09 2016

Examples

			a(1) = 2 because 561 - 2 = 559 has 2 prime divisors that are 13 and 43.
		

Crossrefs

Programs

  • PARI
    isA002997(n)=my(f); bittest(n, 0) && !for(i=1, #f=factor(n)~, (f[2, i]==1 && n%(f[1, i]-1)==1)||return) && #f>1
    for(n=561, 1e7, if(isA002997(n), print1(bigomega(n-2), ", ")));

Formula

a(n) = A001222(A002997(n)-2).

A298701 Irregular triangle read by rows in which row n lists the prime factors of the n-th Carmichael number.

Original entry on oeis.org

3, 11, 17, 5, 13, 17, 7, 13, 19, 5, 17, 29, 7, 13, 31, 7, 23, 41, 7, 19, 67, 5, 29, 73, 7, 31, 73, 13, 37, 61, 7, 11, 13, 41, 13, 37, 97, 7, 73, 103, 3, 5, 47, 89, 7, 13, 19, 37, 11, 13, 17, 31, 7, 11, 13, 101, 13, 37, 241, 7, 13, 19, 73, 17, 41, 233, 7, 13, 31, 61
Offset: 1

Views

Author

Tim Johannes Ohrtmann, Jan 26 2018

Keywords

Comments

The n-th row is the A002997(n)-th row of A027746.
Length of the n-th row is A135717(n).
First term of the n-th row is A141710(n).
Last term of the n-th row is A081702(n).

Examples

			Array begins:
3, 11, 17,
5, 13, 17,
7, 13, 19,
5, 17, 29,
7, 13, 31.
		

Crossrefs

Showing 1-8 of 8 results.