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 38 results. Next

A295740 Even pseudoprimes (A006935) that are not squarefree.

Original entry on oeis.org

190213279479817426, 283959621257123566, 301971651496560046, 575203724324614126, 800951203404568126, 849341919686285026, 1118572636403947726, 2080713636347910526, 2270517620327541586, 2767984602684877486, 5013069719001987826, 5133266340887464066, 5252931629341901506, 5743747078662858526
Offset: 1

Views

Author

Max Alekseyev, Nov 26 2017

Keywords

Comments

For a prime p, if p^2 divides an even pseudoprime, then p is a Wieferich prime (A001220) and A007733(p)=A002326((p-1)/2) is odd. Currently, the only known such prime is p=3511.
So, all known terms are multiples of 3511^2. Furthermore, no term can be a multiple of 3511^3.

Examples

			a(1) = 190213279479817426 = 2 * 7 * 79 * 1951 * 3511^2 * 7151.
a(2) = 283959621257123566 = 2 * 599 * 937 * 3511^2 * 20521.
a(3) = 301971651496560046 = 2 * 31 * 71 * 73 * 3511^2 * 76231.
		

Crossrefs

Intersection of A006935 and A013929.
The even terms of A158358. Also, unless there is a Wieferich prime greater than 3511, the even terms of A247831.

A303008 Even pseudoprimes m (A006935) such that 2m+1 is prime.

Original entry on oeis.org

2, 126217792286, 600030498926, 1248599869826, 226537279412126, 7615111129051346, 9609149773927166, 17502271515299726, 20140666152370226, 126921319513852046, 133564589570047406, 141572739574418846, 185615640867777506, 193420934175277166
Offset: 1

Views

Author

Max Alekseyev, Apr 17 2018

Keywords

Comments

For n>1, 2*a(n)+1 belongs to A300193.

Crossrefs

Subsequence of A006935.

A350083 a(n) = (A006935(n) - 1) / ord(2,A006935(n)/2), where ord(k,m) is the multiplicative order of k modulo m.

Original entry on oeis.org

1, 617, 1305, 9339, 225, 5297, 6985, 1549, 174233, 46549, 93701, 66879, 431087, 593887, 1288921, 446275, 43685, 1205, 3361, 2577225, 1313, 430739, 177301, 8541, 13067, 474525, 561301, 84725, 158873, 725725, 3851, 14019, 128861, 1090301, 2529, 430667, 541673
Offset: 1

Views

Author

Jianing Song, Dec 12 2021

Keywords

Comments

List of (2*k-1) / ord(2,k) where k ranges over the odd numbers such that 2^(2*k-1) == 1 (mod k).

Examples

			A006935(2) = 161038, so a(2) = (161038 - 1) / ord(2,161038/2) = 617.
A006935(3) = 215326, so a(3) = (215326 - 1) / ord(2,215326/2) = 1305.
		

Crossrefs

Programs

  • PARI
    list(lim) = my(v=[],d); forstep(k=1, lim, 2, if((2*k-1)%(d=znorder(Mod(2,k)))==0, v=concat(v,(2*k-1)/d))); v \\ gives a(n) for A347906(n) <= lim

Formula

a(n) = (2*A347906(n) - 1) / ord(2,A347906(n)) = (A006935(n) - 1) / A350084(n).

A350084 a(n) = ord(2,A006935(n)/2), where ord(k,m) is the multiplicative order of k modulo m.

Original entry on oeis.org

1, 261, 165, 275, 13425, 1485, 1305, 32085, 825, 3465, 2093, 3135, 495, 495, 261, 847, 9405, 552189, 198561, 261, 579261, 2475, 6237, 166725, 111111, 3393, 3565, 25245, 18585, 4437, 891891, 309455, 37125, 4833, 2301585, 14355, 11781, 3315, 915, 84975, 35259
Offset: 1

Views

Author

Jianing Song, Dec 12 2021

Keywords

Comments

List of ord(2,k) where k ranges over the odd numbers such that 2^(2*k-1) == 1 (mod k).

Examples

			A006935(2) = 161038, so a(2) = ord(2,161038/2) = 261.
A006935(3) = 215326, so a(3) = ord(2,215326/2) = 165.
		

Crossrefs

Programs

  • PARI
    list(lim) = my(v=[],d); forstep(k=1, lim, 2, if((2*k-1)%(d=znorder(Mod(2,k)))==0, v=concat(v,d))); v \\ gives a(n) for A347906(n) <= lim

Formula

a(n) = ord(2,A347906(n)) = (A006935(n) - 1) / A350083(n).

A270973 Smallest base-2 even pseudoprime (A006935) with exactly n prime factors, or 0 if no such number exists.

Original entry on oeis.org

161038, 215326, 209665666, 4783964626, 1656670046626, 1202870727916606, 52034993731418446, 1944276680165220226, 1877970990972707747326, 1959543009026971258888306, 102066199849378101848830606
Offset: 3

Views

Author

Jeppe Stig Nielsen, Mar 27 2016

Keywords

Comments

From Daniel Suteu, Feb 21 2023: (Start)
a(14) <= 830980424310040957294391274226,
a(15) <= 108084747660126676387861365978526,
a(16) <= 37216678196711615864826518577193726,
a(17) <= 14165393571115472875428298421578481266,
a(18) <= 29754760201190206689697709808980720234206,
a(19) <= 83297267513662079869290363590704788631466446. (End)

Examples

			a(5) = 209665666 because 209665666 belongs to A006935 (is an even pseudoprime) and Omega(209665666) = 5 (Omega(n) is the count of divisors of n with multiplicity), and 209665666 is minimal with these properties.
		

Crossrefs

Programs

  • PARI
    a(n)=my(k=prod(i=1,n,prime(i))); while(Mod(2, k)^k!=2 || bigomega(k)!=n, k += 2); k \\ Charles R Greathouse IV, Mar 27 2016
    
  • PARI
    even_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, next); my(v=m*q, t=q); while(v <= B, my(L=lcm(l, znorder(Mod(base, t)))); if(gcd(L, v) != 1, break); if(j==1, if(v>=A && if(k==1, !isprime(v), 1) && (v-1)%L == 0, listput(list, v)), list=concat(list, f(v, L, q+1, j-1))); v *= q; t *= q)); list); vecsort(Vec(f(2, 1, 3, k-1)));
    a(n) = if(n < 3, return()); my(x=vecprod(primes(n)), y=3*x); while(1, my(v=even_fermat_psp(x, y, n, 2)); if(#v >= 1, return(v[1])); x=y+1; y=3*x); \\ Daniel Suteu, Feb 20 2023

Extensions

Escape clause added by Jianing Song, Dec 12 2021
a(9)-a(13) from Daniel Suteu, Feb 20 2023

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

A015910 a(n) = 2^n mod n.

Original entry on oeis.org

0, 0, 2, 0, 2, 4, 2, 0, 8, 4, 2, 4, 2, 4, 8, 0, 2, 10, 2, 16, 8, 4, 2, 16, 7, 4, 26, 16, 2, 4, 2, 0, 8, 4, 18, 28, 2, 4, 8, 16, 2, 22, 2, 16, 17, 4, 2, 16, 30, 24, 8, 16, 2, 28, 43, 32, 8, 4, 2, 16, 2, 4, 8, 0, 32, 64, 2, 16, 8, 44, 2, 64, 2, 4, 68, 16, 18, 64, 2, 16, 80, 4, 2, 64
Offset: 1

Views

Author

Keywords

Comments

2^n == 2 mod n if and only if n is a prime or a member of A001567 or of A006935. [Guy]. - N. J. A. Sloane, Mar 22 2012; corrected by Thomas Ordowski, Mar 26 2016
Known solutions to 2^n == 3 (mod n) are given in A050259.
This sequence is conjectured to include every integer k >= 0 except k = 1. A036236 includes a proof that k = 1 is not in this sequence, and n = A036236(k) solves a(n) = k for all other 0 <= k <= 1000. - David W. Wilson, Oct 11 2011
It could be argued that a(0) := 1 would make sense, e.g., thinking of "mod n" as "in Z/nZ", and/or because (anything)^0 = 1. See also A112987. - M. F. Hasler, Nov 09 2018

Examples

			a(7) = 2 because 2^7 = 128 = 2 mod 7.
a(8) = 0 because 2^8 = 256 = 0 mod 8.
a(9) = 8 because 2^9 = 512 = 8 mod 9.
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, F10.

Crossrefs

Programs

Formula

a(2^k) = 0. - Alonso del Arte, Nov 10 2014
a(n) == 2^(n-phi(n)) mod n, where phi(n) = A000010(n). - Thomas Ordowski, Mar 26 2016

A015919 Positive integers k such that 2^k == 2 (mod k).

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 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, 311, 313, 317, 331, 337, 341, 347, 349, 353, 359, 367
Offset: 1

Views

Author

Keywords

Comments

Includes 341 which is first pseudoprime to base 2 and distinguishes sequence from A008578.
First composite even term is a(14868) = 161038 = A006935(2). - Max Alekseyev, Feb 11 2015
If k is a term, then so is 2^k - 1. - Max Alekseyev, Sep 22 2016
Terms of the form 2^k - 2 correspond to k in A296104. - Max Alekseyev, Dec 04 2017
If 2^k - 1 is a term, then so is k. - Thomas Ordowski, Apr 27 2018

Crossrefs

Contains A002997 as a subsequence.
The odd terms form A176997.

Programs

  • Mathematica
    Prepend[ Select[ Range@370, PowerMod[2, #, #] == 2 &], {1, 2}] // Flatten (* Robert G. Wilson v, May 16 2018 *)
  • PARI
    is(n)=Mod(2,n)^n==2 \\ Charles R Greathouse IV, Mar 11 2014
    
  • Python
    def ok(n): return pow(2, n, n) == 2%n
    print([k for k in range(1, 400) if ok(k)]) # Michael S. Branicky, Jun 03 2022

Formula

Equals {1} U A000040 U A001567 U A006935 = A001567 U A006935 U A008578. - Ray Chandler, Dec 07 2003; corrected by Max Alekseyev, Feb 11 2015

A130433 Even pseudoprimes to base 3.

Original entry on oeis.org

286, 24046, 232726, 1304446, 1707266, 2232026, 3197806, 3922126, 4446982, 5603326, 5886166, 10123366, 10169926, 12304774, 13658086, 45133726, 47766286, 52249654, 62656126, 75421126, 76254046, 91459126, 91612246, 96956926, 108571606, 139868326, 151513846
Offset: 1

Views

Author

Alexander Adamchuk, May 26 2007, Jun 17 2007

Keywords

Comments

The first 27 terms (halved) are given in Table 1 by Paszkiewicz and Rotkiewicz. - R. J. Mathar, Aug 22 2012

Crossrefs

Even terms of A005935.
Terms of A122780 that are congruent to 2 or 4 modulo 6.

Programs

  • Mathematica
    Do[ f=PowerMod[ 3, 2n-1, 2n ]; If[ f==1, Print[ 2n ] ], {n,2,7000000} ]
  • PARI
    forstep(n=4,10^10,2,Mod(3,n)^(n-1)==1 && print1(n,", ")) \\ Jeppe Stig Nielsen, Apr 25 2018

Extensions

More terms from Alexander Adamchuk, Jun 17 2007
a(25)-a(27) from Jeppe Stig Nielsen, Apr 25 2018

A090084 Even pseudoprimes to base 11.

Original entry on oeis.org

10, 70, 190, 1330, 8170, 9730, 24130, 28462, 58030, 98458, 143830, 144886, 327370, 856786, 1580230, 1620130, 3536470, 5274970, 6082490, 6376126, 6792710, 8066170, 8610610, 14076910, 17728930, 27275158, 42447406, 52970386, 53497978, 68925130
Offset: 1

Views

Author

Labos Elemer, Nov 25 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Do[ f=PowerMod[ 11, 2n-1, 2n ]; If[ f==1, Print[ 2n ] ],{n,2,800000} ] (* Alexander Adamchuk, May 26 2007 *)
    lst = {}; Do[ If[ PowerMod[11, 2n - 1, 2n] == 1, AppendTo[lst, 2n]], {n, 2, 2*10^9}]; lst (* Robert G. Wilson v, Jun 01 2007 *)
    Select[Range[4,68926000,2],PowerMod[11,#-1,#]==1&] (* Harvey P. Dale, Oct 16 2021 *)
  • PARI
    is(k) = k > 2 && !(k % 2) &&  Mod(11, k)^(k-1) == 1; \\ Amiram Eldar, Sep 18 2024

Extensions

More terms from Alexander Adamchuk, May 26 2007
Further terms from Robert G. Wilson v, Jun 01 2007
Showing 1-10 of 38 results. Next