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-6 of 6 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

A087442 Numbers n such that n is not the power of a prime and such that for every prime divisor p of n, p-1 divides n-1.

Original entry on oeis.org

45, 225, 325, 405, 561, 637, 891, 1105, 1125, 1225, 1377, 1729, 2025, 2465, 2821, 3321, 3645, 3751, 3825, 4225, 4961, 5589, 5625, 6517, 6525, 6601, 7381, 8125, 8281, 8625, 8911, 9801, 10125, 10585, 10625, 12025, 13357, 13833, 14161, 15841, 15925
Offset: 1

Views

Author

Jens Voß, Sep 04 2003

Keywords

Comments

Weak Carmichael numbers that are not prime powers [Mestrovic] - N. J. A. Sloane, Aug 25 2013
The values of this sequence together with the set of prime powers (A000961) forms the sequence A087441.

Examples

			45 is in A087442 because it is not a prime power and because its prime divisors are 3 and 5 and 3-1=2 as well as 5-1=4 divide 45-1 = 44.
		

Crossrefs

Programs

  • GAP
    for i in [2..20000] do if IsSubset (DivisorsInt(i-1), Set (FactorsInt (i)) - 1) and not IsPrimePowerInt (i) then Print (i, ", "); fi; od;
  • Mathematica
    wcQ[n_] := Length[(p = FactorInteger[n][[;;,1]])] > 1 && AllTrue[p, Divisible[n-1, #-1] &]; Select[Range[10^4], wcQ] (* Amiram Eldar, Sep 22 2019 *)

A365022 The lesser of twin Carmichael numbers: a pair of consecutive Carmichael numbers (A002997) without a non-prime-power weak Carmichael number (A087442) between them.

Original entry on oeis.org

2465, 62745, 512461, 656601, 658801, 838201, 1033669, 2100901, 4903921, 5968873, 6049681, 8341201, 8719309, 9439201, 9582145, 9585541, 11119105, 11921001, 12261061, 15829633, 17236801, 26921089, 35571601, 36121345, 38624041, 41341321, 43286881, 43584481, 45877861
Offset: 1

Views

Author

Amiram Eldar, Aug 17 2023

Keywords

Comments

The sequence of weak Carmichael numbers is A225498. The weak Carmichael numbers that are not powers of primes (A000961) are in A087442.

Crossrefs

Subsequence of A002997.
Cf. A000961, A087442, A225498, A365023 (greater counterparts), A365024.

Programs

  • Mathematica
    npwcQ[n_] := Length[(p = FactorInteger[n][[;; , 1]])] > 1 && AllTrue[p, Divisible[n - 1, # - 1] &]; (* A087442 *)
    seq[nmax_] := Module[{carmichaels = Select[Range[1, nmax, 2], CompositeQ[#] && Divisible[# - 1, CarmichaelLambda[#]] &], s = {}, c1, c2}, Do[c1 = carmichaels[[k]] + 2; c2 = carmichaels[[k + 1]] - 2; While[c1 < c2, If[npwcQ[c1], Break[]]; c1 += 2]; If[c1 == c2, AppendTo[s, carmichaels[[k]]]], {k, 1, Length[carmichaels] - 1}]; s]; seq[10^6]

A365023 The greater of twin Carmichael numbers: a pair of consecutive Carmichael numbers (A002997) without a non-prime-power weak Carmichael number (A087442) between them.

Original entry on oeis.org

2821, 63973, 530881, 658801, 670033, 852841, 1050985, 2113921, 4909177, 6049681, 6054985, 8355841, 8719921, 9494101, 9585541, 9613297, 11205601, 11972017, 12262321, 15888313, 17316001, 26932081, 35703361, 36765901, 38637361, 41471521, 43331401, 43620409, 45890209
Offset: 1

Views

Author

Amiram Eldar, Aug 17 2023

Keywords

Crossrefs

Subsequence of A002997.
Cf. A000961, A087442, A225498, A365022 (lesser counterparts), A365024.

Programs

  • Mathematica
    npwcQ[n_] := Length[(p = FactorInteger[n][[;; , 1]])] > 1 && AllTrue[p, Divisible[n - 1, # - 1] &]; (* A087442 *)
    seq[nmax_] := Module[{carmichaels = Select[Range[1, nmax, 2], CompositeQ[#] && Divisible[# - 1, CarmichaelLambda[#]] &], s = {}, c1, c2}, Do[c1 = carmichaels[[k]] + 2; c2 = carmichaels[[k + 1]] - 2; While[c1 < c2, If[npwcQ[c1], Break[]]; c1 += 2]; If[c1 == c2, AppendTo[s, carmichaels[[k+1]]]], {k, 1, Length[carmichaels] - 1}]; s]; seq[10^6]

A365024 Starts of runs of 3 consecutive Carmichael numbers (A002997) without a non-prime-power weak Carmichael number (A087442) between any two consecutive members.

Original entry on oeis.org

656601, 5968873, 9582145, 45877861, 67653433, 84311569, 171454321, 171679561, 193708801, 193910977, 230630401, 357277921, 367804801, 393122521, 393513121, 393716701, 395044651, 557160241, 703995733, 710382401, 775368901, 832060801, 833608321, 834244501, 939947009
Offset: 1

Views

Author

Amiram Eldar, Aug 17 2023

Keywords

Comments

The second member in each triple is a term of both A365022 and A365023.
171454321 is the least start of 4 consecutive Carmichael numbers with this property, and 393122521 is the least start of 5, and also 6, consecutive Carmichael numbers with this property.

Crossrefs

Subsequence of A002997 and A365023.

Programs

  • Mathematica
    npwcQ[n_] := Length[(p = FactorInteger[n][[;; , 1]])] > 1 && AllTrue[p, Divisible[n - 1, # - 1] &]; (* A087442 *)
    seq[indmax_] := Module[{carmichaels = Cases[Import["https://oeis.org/A002997/b002997.txt", "Table"], {, }][[;; , 2]], s1 = s2 = {}, c1, c2, i}, Do[c1 = carmichaels[[k]] + 2; c2 = carmichaels[[k + 1]] - 2; While[c1 < c2, If[npwcQ[c1], Break[]]; c1 += 2]; If[c1 == c2, AppendTo[s1, carmichaels[[k]]]; AppendTo[s2, carmichaels[[k + 1]]]], {k, 1, Min[indmax, Length[carmichaels] - 1]}]; i = Position[Rest[s1] - Most[s2], 0] // Flatten; s1[[i]]]; seq[200]

A325147 Reduced Clausen numbers.

Original entry on oeis.org

10, 546, 2, 46, 6630, 76670, 211659630, 6, 261870, 111418, 46, 13589784390, 524588442, 114, 1138240087314330, 2, 276742830, 26805565070, 1909802752494, 3210, 15370, 177430547680928732190, 358, 5760551069383110, 76004922, 1126, 4347631610092420338, 81366
Offset: 1

Views

Author

Peter Luschny, May 21 2019

Keywords

Comments

Let P(m) denote the prime factors of m and C(m) = Clausen(m-1, 1) (cf. A160014) then Product_{p in P(C(m)) setminus P(m)} p is in this sequence provided P(m) is a subset of P(C(m)).

Examples

			Let n = 561 then P(561) = {3, 11, 17} and P(Clausen(560,1)) = {2, 3, 5, 11, 17, 29, 41, 71, 113, 281}. Since P(561) is a subset of P(Clausen(560, 1)), a(18) = 2*5*29*41*71*113*281 = 26805565070.
		

Crossrefs

Weak Carmichael numbers are A225498. Clausen numbers are in A160014.
A324977 is a subsequence.

Programs

  • Maple
    with(numtheory): a := proc(n) if isweakCarmichael(n) then # cf. A225498 and A160014
    mul(m, m in factorset(Clausen(n-1, 1)) minus factorset(n)) else NULL fi end:
    seq(a(n), n=2..1350);
  • Mathematica
    pf[n_] := FactorInteger[n][[All, 1]];
    Clausen[0, ] = 1; Clausen[n, k_] := Times @@ (Select[Divisors[n], PrimeQ[# + k]&] + k);
    weakCarmQ[n_] := If[EvenQ[n] || PrimeQ[n], Return[False], pf[n] == (pf[n] ~Intersection~ pf[Clausen[n - 1, 1]])];
    f[n_] := Times @@ Complement[pf[Clausen[n - 1, 1]], pf[n]];
    f /@ Select[Range[2, 2000], weakCarmQ] (* Jean-François Alcover, Jul 21 2019 *)
Showing 1-6 of 6 results.