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 17 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

A005935 Pseudoprimes to base 3.

Original entry on oeis.org

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

Views

Author

Keywords

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

Crossrefs

Pseudoprimes to other bases: A001567 (2), A005936 (5), A005937 (6), A005938 (7), A005939 (10).
Subsequence of A122780.
Cf. A005382.

Programs

  • 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 *)
  • PARI
    is_A005935(n)={Mod(3,n)^(n-1)==1 & !ispseudoprime(n) & n>1}  \\ M. F. Hasler, Jul 19 2012

Extensions

More terms from David W. Wilson, Aug 15 1996

A005936 Pseudoprimes to base 5.

Original entry on oeis.org

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

Views

Author

Keywords

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

Crossrefs

Pseudoprimes to other bases: A001567 (2), A005935 (3), A005937 (6), A005938 (7), A005939 (10).

Programs

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

Extensions

More terms from David W. Wilson, Aug 15 1996

A090086 Smallest pseudoprime to base n, not necessarily exceeding n (cf. A007535).

Original entry on oeis.org

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

Views

Author

Labos Elemer, Nov 25 2003

Keywords

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
a(n) is the smallest composite k such that n^(k-1) == (1-k)^n (mod k). - Thomas Ordowski, Mar 19 2025

Examples

			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.
		

Crossrefs

Programs

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

Formula

a(n) = LeastComposite{x; n^(x-1) mod x = 1}.

A020233 Strong pseudoprimes to base 7.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

A130434 Even pseudoprimes to base 7.

Original entry on oeis.org

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

Views

Author

Alexander Adamchuk, May 26 2007

Keywords

Crossrefs

Programs

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

Extensions

a(9)-a(37) from Robert G. Wilson v, May 28 2007

A262104 Pseudoprimes to base 7, written in base 7.

Original entry on oeis.org

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

Views

Author

Abdul Gaffar Khan, Sep 11 2015

Keywords

Crossrefs

Cf. A005938 (pseudoprimes to base 7), A007093 (numbers in base 7).

Programs

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

Formula

a(n) = A007093(A005938(n)).

A083739 Pseudoprimes to bases 2, 3, 5 and 7.

Original entry on oeis.org

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

Views

Author

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

Keywords

Examples

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

Crossrefs

Proper subset of A083737.

Programs

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

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

Extensions

Edited by Robert G. Wilson v, May 06 2003

A243089 Pseudoprimes to base 7 that are not squarefree.

Original entry on oeis.org

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

Views

Author

Felix Fröhlich, Aug 18 2014

Keywords

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

Crossrefs

Programs

  • PARI
    forcomposite(n=1, 1e9, if(Mod(7, n)^(n-1)==1, if(!issquarefree(n), print1(n, ", "))))

A122784 Nonprimes k such that 7^k == 7 (mod k).

Original entry on oeis.org

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

Views

Author

Farideh Firoozbakht, Sep 12 2006

Keywords

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.

Crossrefs

Programs

  • 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 *)
Showing 1-10 of 17 results. Next