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-10 of 11 results. Next

A001567 Fermat pseudoprimes to base 2, also called Sarrus numbers or Poulet numbers.

Original entry on oeis.org

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

Views

Author

Keywords

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)
If m is a term of this sequence, then (m-1)/ord(2,m) >= 5, where ord(a,m) is the multiplicative order of a modulo m; see my link below. Actually, it seems that we always have (m-1)/ord(2,m) >= 9. - Jianing Song, Nov 04 2024

References

  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §3.2 Prime Numbers, p. 80.
  • 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.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 88-92.
  • 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).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 145.

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).

Programs

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

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

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

A083737 Pseudoprimes to bases 2, 3 and 5.

Original entry on oeis.org

1729, 2821, 6601, 8911, 15841, 29341, 41041, 46657, 52633, 63973, 75361, 101101, 115921, 126217, 162401, 172081, 188461, 252601, 294409, 314821, 334153, 340561, 399001, 410041, 488881, 512461, 530881, 552721, 658801, 670033, 721801, 748657
Offset: 1

Views

Author

Serhat Sevki Dincer (sevki(AT)ug.bilkent.edu.tr), May 05 2003

Keywords

Comments

a(n) = n-th positive integer k(>1) such that 2^(k-1) == 1 (mod k), 3^(k-1) == 1 (mod k) and 5^(k-1) == 1 (mod k)
See A153580 for numbers k > 1 such that 2^k-2, 3^k-3 and 5^k-5 are all divisible by k but k is not a Carmichael number (A002997).
Note that a(1)=1729 is the Hardy-Ramanujan number. - Omar E. Pol, Jan 18 2009

Examples

			a(1)=1729 since it is the first number such that 2^(k-1) == 1 (mod k), 3^(k-1) == 1 (mod k) and 5^(k-1) == 1 (mod k).
		

Crossrefs

Proper subset of A052155. Superset of A230722. Cf. A153580, A002997, A001235, A011541.

Programs

  • Mathematica
    Select[ Range[838200], !PrimeQ[ # ] && PowerMod[2, # - 1, # ] == 1 && PowerMod[3, 1 - 1, # ] == 1 && PowerMod[5, # - 1, # ] == 1 & ]
  • PARI
    is(n)=!isprime(n)&&Mod(2,n)^(n-1)==1&&Mod(3,n)^(n-1)==1&&Mod(5,n)^(n-1)==1 \\ Charles R Greathouse IV, Apr 12 2012

Extensions

Edited by Robert G. Wilson v, May 06 2003
Edited by N. J. A. Sloane, Jan 14 2009

A083876 Least pseudoprime to base 2 through base prime(n).

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, May 06 2003

Keywords

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

Crossrefs

Programs

  • 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}]
  • 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

A271221 Smallest Fermat pseudoprime k to all bases b = 2, 3, 4, ..., n.

Original entry on oeis.org

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

Views

Author

Felix Fröhlich, Apr 02 2016

Keywords

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

Crossrefs

Programs

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

Extensions

Edited by Thomas Ordowski, Apr 29 2018
Corrected a typo within the initial terms by Jens Ahlström, Apr 23 2024

A114246 Number of Fermat pseudoprimes to bases 2 and 3 less than 10^n.

Original entry on oeis.org

0, 0, 0, 7, 23, 66, 187, 485, 1272, 3270, 8139, 20015, 50090, 125284, 318729, 813380, 2104139, 5514763, 14627441
Offset: 1

Views

Author

Eric W. Weisstein, Nov 18 2005

Keywords

Crossrefs

Cf. A052155.

Programs

  • Mathematica
    Table[Count[Select[Range[2, 10^6], ! PrimeQ[#] && PowerMod[2, # - 1, #] == 1 && PowerMod[3, # - 1, #] == 1 &], x_ /; x < 10^n], {n, 6}]  (* Robert Price, Jun 09 2019 *)
  • PARI
    my(n=1, i=0); forcomposite(k=1, 1e20, if(Mod(2, k)^(k-1)==1 && Mod(3, k)^(k-1)==1, i++); if(k==10^n, print1(i, ", "); n++)) \\ Felix Fröhlich, Oct 11 2015

Extensions

a(9) from Felix Fröhlich, Oct 11 2015
a(10)-a(11) from Amiram Eldar, Sep 18 2021
a(12)-a(19) from Amiram Eldar, Apr 22 2022

A318761 Composite k that divides 2^(k-2) + 3^(k-2) + 6^(k-2) - 1.

Original entry on oeis.org

4, 6, 8, 12, 24, 25, 125, 174, 228, 276, 325, 348, 451, 1032, 1105, 1128, 1729, 2388, 2465, 2701, 2821, 3721, 5272, 5365, 6601, 8911, 10585, 12025, 12673, 15841, 18721, 22681, 23585, 23725, 29341, 31621, 32376, 35016, 35425, 41041, 41125, 46632, 46657, 47125
Offset: 1

Views

Author

Jianing Song, Sep 02 2018

Keywords

Comments

Note that for primes p >= 5, p always divides 2^(p-2) + 3^(p-2) + 6^(p-2) - 1 (see A318760).
It's interesting to study the squares of primes in this sequence. For primes p >= 5, x^(p^2-2) == x^(p-2) (mod p^2) for any integer x, so p^2 is a term if and only if p^2 divides 2^(p-2) + 3^(p-2) + 6^(p-2) - 1. It's easy to see that for any prime p, p^2 is a term of this sequence if and only if p is in A238201 and p != 3 (p = 2, 5, 61, 1680023, 7308036881, there are no others up to 7*10^10). - Jianing Song, Dec 25 2018

Examples

			(2^10 + 3^10 + 6^10 - 1)/12 = 5403854 which is an integer, so 12 is a term.
(2^22 + 3^22 + 6^22 - 1)/24 = 5484238967813377 which is also an integer, so 24 is a term.
		

Crossrefs

A052155 is a proper subsequence.

Programs

  • Mathematica
    Select[Range[48000], CompositeQ[#] && Mod[Sum[PowerMod[k, #-2, #],{k, {2, 3, 6}}], #] == 1 &] (* Amiram Eldar, Jul 17 2024 *)
  • PARI
    b(n) = lift(Mod(2, n)^(n-2) + Mod(3, n)^(n-2) + Mod(6, n)^(n-2));
    for(n=2, 30000, if(isprime(n)==0&&b(n)==1, print1(n, ", ")))

A330208 Chebyshev pseudoprimes to both base 2 and base 3: composite numbers k such that T(k, 2) == 2 (mod k) and T(k, 3) == 3 (mod k), where T(k, x) is the k-th Chebyshev polynomial of the first kind.

Original entry on oeis.org

5719, 6061, 11395, 15841, 17119, 18721, 31535, 67199, 73555, 84419, 117215, 133399, 133951, 174021, 181259, 194833, 226801, 273239, 362881, 469201, 516559, 522899, 534061, 588455, 665281, 700321, 721801, 778261, 903959, 1162349, 1561439, 1708901, 1755001, 1809697
Offset: 1

Views

Author

Amiram Eldar, Dec 05 2019

Keywords

Comments

Bang proved that T(p, a) == a (mod p) for every a > 0 and every odd prime. Rayes et al. (1999) defined Chebyshev pseudoprimes to base a as composite numbers k such that T(k, a) == a (mod k). They noted that there are no Chebyshev pseudoprimes in both bases 2 and 3 below 2000.

Examples

			5719 is in the sequence since 5719 = 7 * 19 * 43 is composite and both T(5719 , 2) - 2 and T(5719, 3) - 3 are divisible by 5719.
		

Crossrefs

Intersection of A330206 and A330207.

Programs

  • Mathematica
    Select[Range[2*10^4], CompositeQ[#] && Divisible[ChebyshevT[#, 2] - 2, #] && Divisible[ChebyshevT[#, 3] - 3, #] &]

A333130 Numbers that are super pseudoprimes to both bases 2 and 3.

Original entry on oeis.org

2701, 18721, 31621, 49141, 83333, 90751, 104653, 226801, 282133, 653333, 665281, 721801, 873181, 1373653, 1530787, 1537381, 1584133, 1690501, 1755001, 1987021, 2008597, 2035153, 2284453, 2746589, 2944261, 3059101, 3116107, 3363121, 3375041, 3375487, 4082653, 4314967
Offset: 1

Views

Author

Amiram Eldar, Mar 08 2020

Keywords

Comments

The first term that has more than 2 prime factors is a(1067) = A333131(1) = 11500521553.
The first term that is also a Carmichael number is a(1131) = 13079177569.

Examples

			2701 is a term since it is a Fermat pseudoprime to both bases 2 and 3, and its proper divisors that are larger than 1 are all primes: 37 and 73.
		

Crossrefs

Intersection of A050217 and A328662.
Subsequence of A001567, A005935, A052155 and A153513.

Programs

  • Mathematica
    pspQ[n_] := CompositeQ[n] && AllTrue[Rest @ Divisors[n], PowerMod[2, # - 1, #] == 1 && PowerMod[3, # - 1, #] == 1 &]; Select[Range[10^6], pspQ]

A333131 Super pseudoprimes to both bases 2 and 3 (A333130) with more than two prime factors (counted with multiplicity).

Original entry on oeis.org

11500521553, 13079177569, 52474339009, 168003672409, 229352039821, 280792563977, 318289021201, 428178002569, 918660756421, 2015841188197, 2367478228501, 2544457029601, 2639665216117, 3023595814801, 3457449931321, 3712164285421, 4348114583017, 6046196043229
Offset: 1

Views

Author

Amiram Eldar, Mar 08 2020

Keywords

Comments

Up to 2^64 all the 1085 terms are nonsquarefree, 2 terms have 4 prime factors: a(163) = 18362297383286473 = 3037 * 6073 * 9109 * 109297 and a(651) = 2587580959818925201 = 18121 * 36241 * 54361 * 72481, and no term have more than 4 prime factors.

Examples

			11500521553 is a term since it is a Fermat pseudoprime to both bases 2 and 3, and its proper divisors that are larger than 1 are either primes (937, 1873, 6553) or Fermat pseudoprimes to both bases 2 and 3 (1755001, 6140161, 12273769, 11500521553).
		

Crossrefs

Programs

  • Mathematica
    pspQ[n_] := PrimeOmega[n] > 2 && AllTrue[Rest @ Divisors[n], PowerMod[2, # - 1, #] == 1 && PowerMod[3, # - 1, #] == 1 &]; seq = {}; Do[If[pspQ[n], AppendTo[seq, n]], {n, 1, 6*10^10}]; seq

A285300 Numbers k such that 3^(k-1) == 2^(k-1) !== 1 (mod k).

Original entry on oeis.org

65, 133, 529, 793, 1649, 2059, 2321, 4187, 5185, 6305, 6541, 6697, 6817, 7471, 7613, 8113, 10963, 11521, 13213, 13333, 13427, 14701, 14981, 19171, 19201, 19909, 21349, 21667, 22177, 26065, 26467, 32873, 35443, 36569, 37333, 38897, 42121, 42127, 44023, 47081
Offset: 1

Views

Author

Thomas Ordowski, Apr 16 2017

Keywords

Comments

All terms are odd composite numbers. There are no pseudoprimes to bases 2 or 3 in this sequence.
Are there infinitely many numbers of this kind?
From Max Alekseyev, Apr 16 2017: (Start)
Also, Fermat pseudoprimes base 2/3 that are not Fermat pseudoprimes base 2.
Also, the set difference of A073631 and either of ({1} U A001567), ({1} U A005935), or ({1} U A052155). (End)

Examples

			2^64 = 18446744073709551616 = 65 * 283796062672454640 + 16 and 3^64 = 3433683820292512484657849089281 = 65 * 52825904927577115148582293681 + 16. Therefore 65 is in the sequence.
Note: a(3) = 529 = 23^2 and a(40) = 47081 = 23^2 * 89.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local t;
      t:= 3 &^(n-1) mod n;
      if t = 1 then return false fi;
      t = 2 &^(n-1) mod n;
    end proc:
    select(filter, [seq(i,i=3..10^5,2)]); # Robert Israel, Apr 27 2017
  • Mathematica
    Select[Range[2, 10^5], PowerMod[2, # - 1, #] == PowerMod[3, # - 1, #] != 1 &] (* Giovanni Resta, Apr 16 2017 *)
  • PARI
    is(n) = Mod(3, n)^(n-1)==2^(n-1) && Mod(2, n)^(n-1)!=1 \\ Felix Fröhlich, Apr 27 2017

Extensions

More terms from Giovanni Resta, Apr 16 2017
Showing 1-10 of 11 results. Next