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

A129521 Numbers of the form p*q, p and q prime with q=2*p-1.

Original entry on oeis.org

6, 15, 91, 703, 1891, 2701, 12403, 18721, 38503, 49141, 79003, 88831, 104653, 146611, 188191, 218791, 226801, 269011, 286903, 385003, 497503, 597871, 665281, 721801, 736291, 765703, 873181, 954271, 1056331, 1314631, 1373653, 1537381
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 19 2007

Keywords

Comments

All terms are Fermat 4-pseudoprimes, i.e., satisfy 4^n == 4 (mod n). See A020136 and A122781.

Crossrefs

Subsequence of A006881, A129510, and A122781.
Intersection of A000384 and A001358, "hexagonal semiprimes". - Wesley Ivan Hurt, Jul 04 2013

Programs

  • Haskell
    a129521 n = p * (2 * p - 1) where p = a005382 n
    -- Reinhard Zumkeller, Nov 10 2013
  • Magma
    [2*n^2-n: n in [0..1000]|IsPrime(n) and IsPrime(2*n-1)]; // Vincenzo Librandi, Dec 27 2010
    
  • Mathematica
    p = Select[Prime[Range[155]], PrimeQ[2# - 1] &]; p (2p - 1) (* Robert G. Wilson v, Sep 11 2011 *)
  • PARI
    forprime(p=2,10000,q=2*p-1;if(isprime(q),print1(p*q,", ")))
    

Formula

a(n) = A005382(n)*A005383(n).

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

A020230 Strong pseudoprimes to base 4.

Original entry on oeis.org

341, 1387, 2047, 3277, 4033, 4371, 4681, 5461, 8321, 8911, 10261, 13747, 14491, 15709, 15841, 19951, 29341, 31621, 42799, 49141, 49981, 52633, 60787, 65077, 65281, 74665, 80581, 83333, 85489, 88357, 90751, 104653, 123251, 129921, 130561, 137149
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A020136 (base 4), A001262 (base 2), A020229 (base 3), A020231 (base 5), A020232 (base 6), A020233 (base 7), A020234 (base 8), A020235 (base 9), A020236 (base 10), A020237 (base 11), A020238 (base 12).

A122781 Nonprimes n such that 4^n==4 (mod n).

Original entry on oeis.org

1, 4, 6, 12, 15, 28, 66, 85, 91, 186, 276, 341, 435, 451, 532, 561, 645, 703, 946, 1068, 1105, 1247, 1271, 1387, 1581, 1695, 1729, 1891, 1905, 2044, 2046, 2047, 2071, 2465, 2701, 2821, 2926, 3133, 3277, 3367, 3683, 4033, 4369, 4371, 4681, 4795
Offset: 1

Views

Author

Farideh Firoozbakht, Sep 12 2006

Keywords

Comments

If both numbers q and 2q-1 are prime, then q*(2q-1) is in the sequence. So, A005382(n)*(2*A005382(n)-1) = A129521(n) form a subsequence.

Crossrefs

Contains A020136, A001567, A006935 (except n=2), and A129521 as subsequences.
Cf. A005382.

Programs

  • Maple
    for n from 1 to 5000 do if 4^n mod n = 4 mod n and not isprime(n) then print(n) fi od; # Gary Detlefs, May 14 2012
  • Mathematica
    Select[Range[4800], ! PrimeQ[ # ] && Mod[4^#, # ] == Mod[4, # ] &]
    Join[{1,4},Select[Range[5000],!PrimeQ[#]&&PowerMod[4,#,#]==4&]] (* Harvey P. Dale, Apr 09 2018 *)

A262101 Pseudoprimes to base 4, written in base 4.

Original entry on oeis.org

33, 1111, 1123, 11111, 12303, 13003, 20301, 22011, 22333, 101101, 103133, 103313, 111223, 120231, 122133, 123001, 131203, 131301, 133333, 200113, 212201, 222031, 230011, 300331, 303031, 310213, 321203, 333001, 1010101, 1010103, 1021021, 1022323, 1023323, 1111111, 1112233, 1213021, 1213303, 1330111, 2002001, 2010201, 2013313, 2023033, 2031211, 2032223
Offset: 1

Views

Author

Abdul Gaffar Khan, Sep 11 2015

Keywords

Crossrefs

Cf. A007090 (numbers in base 4), A020136 (pseudoprimes to base 4).

Programs

  • Mathematica
    BaseForm[Select[Range[4096], Not[PrimeQ[#]] && PowerMod[4, # - 1, #] == 1 &], 4]
  • PARI
    lista(nn, b=4) = {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) = A007090(A020136(n)).

A303009 Numbers n such that both A002450(n)=(2^(2n)-1)/3 and A007583(n)=2*A002450(n)+1 are Fermat pseudoprimes to base 2 (A001567).

Original entry on oeis.org

23, 29, 41, 53, 89, 113, 131, 179, 191, 233, 239, 251, 281, 293, 341, 359, 419, 431, 443, 491, 509, 593, 641, 653, 659, 683, 719, 743, 761, 809, 911, 953, 1013, 1019, 1031, 1049, 1103, 1223, 1229, 1271, 1289, 1409, 1439, 1451, 1481, 1499, 1511, 1559, 1583, 1601, 1733, 1811, 1889, 1901, 1931, 1973, 2003
Offset: 1

Views

Author

Max Alekseyev, Apr 23 2018

Keywords

Comments

It can be shown that if n is odd, it is a prime or a Fermat 4-pseudoprime (A020136) not divisible by 3. Similarly, 2n+1 is a prime or a Fermat 2-pseudoprime (A001567) not divisible by 3. In fact, the sequence is the union of the following six:
(i) primes n such that 2n+1 is prime (cf. A005384) and A007583(n) is composite, with smallest such term n=a(1)=23;
(ii) primes n==2 (mod 3) such that 2n+1 is a 2-psp (no such terms are known);
(iii) 4-pseudoprimes n==5 (mod 6) such that 2n+1 is prime and A007583(n) is composite, with smallest such term n=a(15)=341;
(iv) 4-pseudoprimes n==5 (mod 6) such that 2n+1 is 2-pseudoprime, with smallest such term n=268435455;
(v) n=2k, where 4k is in A015921 and k==1 (mod 3), such that 2n+1 is prime and A007583(n) is composite, with the smallest such term n=67166;
(vi) n=2k, where 4k is in A015921 and k==1 (mod 3), such that 2n+1 is a 2-psp, with the smallest such term n=9042986.

Crossrefs

Extensions

Edited by Max Alekseyev, Aug 08 2019

A176033 Numbers k such that 2^(2k-1) == 2 (mod 2k) and such that 2^(k-1) != 1 (mod k).

Original entry on oeis.org

15, 85, 91, 435, 451, 703, 1247, 1271, 1581, 1695, 1891, 2071, 3133, 3367, 3683, 4795, 4859, 5551, 6643, 8695, 9061, 9131, 9211, 9605, 9919, 12403, 13019, 14351, 14701, 15051, 15211, 16021, 16471, 19669, 20191, 20485, 24727, 25351, 26335, 26599, 27511, 28645
Offset: 1

Views

Author

Alzhekeyev Ascar M, Dec 06 2010

Keywords

Comments

The associated value m = (2^(k-1) mod k) satisfy 1 < gcd(m-1, k) < k.
The selection criterion 2^(2k-1) == 2 (mod 2k) admits 3, 5, 7, 11, 13, 15, 17, etc.
Expect that the sequences will be infinite only if the criterion has the form 2^(2k-1) == 2^m (mod 2k) where m - an integer (1, 2, ...), otherwise the sequence will be limited. For example, for criterion 2^(2k-1) == 14 (mod 2k), the sequence begins 9, 27, 7281, 19143.

Crossrefs

Set difference of A020136 and A001567. - Max Alekseyev, Nov 06 2017

Programs

  • Maple
    select(n -> 2 &^ (2*n-1) - 2 mod (2*n) = 0 and 2 &^ (n-1) -1 mod n <> 0, [seq(n,n=3..10^5,2)]); # Robert Israel, Nov 06 2017
  • Mathematica
    Select[Range[30000],PowerMod[2,2#-1,2#]==2&&PowerMod[2,#-1,#]!=1&] (* Harvey P. Dale, Jul 06 2025 *)
  • PARI
    alist(m) = {for (n=1, m, v = 2^(2*n-1); if ((v % (2*n) == 2), k = 2^(n-1) % n; if (k > 1, print1(n, ", "););););} \\ Michel Marcus, Jan 24 2013

Extensions

More terms from Michel Marcus, Jan 24 2013

A271874 Smallest base-n Fermat pseudoprime with n distinct prime factors.

Original entry on oeis.org

341, 286, 11305, 2203201, 12306385, 9073150801, 3958035081, 2539184851126, 152064312120721, 10963650080564545, 378958695265110961, 1035551157050957605345, 57044715596229144811105, 6149883077429715389052001, 426634466310819456228926101, 166532358913107245358261399361
Offset: 2

Views

Author

Felix Fröhlich, Apr 16 2016

Keywords

Comments

Main diagonal of A271873.

Examples

			a(4) = 11305, since 11305 is the smallest term x of A020136 such that A001221(x) = 4.
		

Crossrefs

Programs

  • PARI
    a(n) = forcomposite(c=1, , if(Mod(n, c)^(c-1)==1, if(omega(c)==n, return(c))))
    
  • PARI
    fermat_psp(A, B, k, base) = A=max(A, vecprod(primes(k))); (f(m, l, p, j) = my(list=List()); forprime(q=p, sqrtnint(B\m, j), if(base%q != 0, my(v=m*q, t=q, r=nextprime(q+1)); while(v <= B, my(L=lcm(l, znorder(Mod(base, t)))); if(gcd(L, v) == 1, if(j==1, if(v>=A && if(k==1, !isprime(v), 1) && (v-1)%L == 0, listput(list, v)), if(v*r <= B, list=concat(list, f(v, L, r, j-1)))), break); v *= q; t *= q))); list); vecsort(Vec(f(1, 1, 2, k)));
    a(n) = if(n < 2, return()); my(x=vecprod(primes(n)), y=2*x); while(1, my(v=fermat_psp(x, y, n, n)); if(#v >= 1, return(v[1])); x=y+1; y=2*x); \\ Daniel Suteu, Sep 02 2022

Extensions

a(7)-a(17) from Daniel Suteu, Sep 02 2022

A179458 Numbers k such that ((2^(2k) - 1) mod 2k) - (2^(2k-1) mod 2k) = 1.

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 15, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 85, 89, 91, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 07 2011

Keywords

Comments

Apparently, the sequence contains 1, odd primes and the elements of A020136. - R. J. Mathar, Jan 09 2011

Crossrefs

Cf. A001567.

Programs

  • Maple
    select(n -> (2 &^ (2*n)-1 mod 2*n)-(2 &^(2*n-1) mod 2*n) = 1, [$1..1000]); # Robert Israel, Oct 25 2017
  • PARI
    isok(n) = (((2^(2*n)-1) % (2*n)) - (2^(2*n-1) % (2*n)) == 1) \\ Michel Marcus, Jul 25 2013
Showing 1-10 of 13 results. Next