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

A235482 Primes whose base-5 representation is also the base-9 representation of a prime.

Original entry on oeis.org

2, 3, 7, 11, 17, 19, 37, 41, 61, 67, 71, 97, 109, 131, 139, 149, 151, 157, 167, 191, 197, 211, 251, 269, 281, 337, 349, 367, 401, 409, 439, 449, 457, 467, 487, 491, 499, 521, 557, 569, 607, 619, 631, 647, 661, 739, 761, 769, 821, 829, 887, 907, 941, 947, 967, 1009, 1019, 1031, 1061, 1069, 1087
Offset: 1

Views

Author

M. F. Hasler, Jan 12 2014

Keywords

Comments

This sequence is part of a two-dimensional array of sequences, given in the LINK, based on this same idea for any two different bases b, c > 1. Sequence A235265 and A235266 are the most elementary ones in this list. Sequences A089971, A089981 and A090707 through A090721, and sequences A065720 - A065727, follow the same idea with one base equal to 10.
A subsequence of A197636 and of course of A000040A015919.

Examples

			41 = 131_5 and 131_9 = 109 are both prime, so 41 is a term.
		

Crossrefs

Cf. A235265, A235266, A235461 - A235481, A065720A036952, A065721 - A065727, A089971A020449, A089981, A090707 - A091924, A235394, A235395. See the LINK for further cross-references.

Programs

  • Mathematica
    Select[Prime@ Range@ 500, PrimeQ@ FromDigits[ IntegerDigits[#, 5], 9] &] (* Giovanni Resta, Sep 12 2019 *)
  • PARI
    is(p,b=9,c=5)=isprime(vector(#d=digits(p,c),i,b^(#d-i))*d~)&&isprime(p) \\ Note: Code only valid for b > c.

A006935 Even pseudoprimes (or primes) to base 2: even n that divide 2^n - 2.

Original entry on oeis.org

2, 161038, 215326, 2568226, 3020626, 7866046, 9115426, 49699666, 143742226, 161292286, 196116194, 209665666, 213388066, 293974066, 336408382, 377994926, 410857426, 665387746, 667363522, 672655726, 760569694, 1066079026, 1105826338, 1423998226, 1451887438, 1610063326, 2001038066, 2138882626, 2952654706, 3220041826
Offset: 1

Views

Author

N. J. A. Sloane, Richard C. Schroeppel

Keywords

Comments

Of course, 2 is the only true prime here.
Numbers a(n)/2 form the odd terms of A130421. - Max Alekseyev, May 28 2014
a(n) == 2 (mod 4), hence there are no consecutive even numbers in this sequence. The closest two terms below 2*10^15 (as computed by Alekseyev) are a(2) = 161038 and a(3) = 215326 with a(3) - a(2) = 54288. Do smaller gaps exist? - Charles R Greathouse IV, Dec 02 2014
Corollary (Rotkiewicz-Ziemak, 1995): 2(2^p-1)(2^q-1) is a pseudoprime if and only if 2(2^(pq)-1) is a pseudoprime, where p,q are distinct primes. - Thomas Ordowski, Apr 09 2016
Numbers 2k such that 2^(2k-1) == 1 (mod k). - Thomas Ordowski, Nov 22 2016
There exist even pseudoprimes that are not squarefree, with the smallest being 190213279479817426 = 2 * 7 * 79 * 1951 * 3511^2 * 7151 (cf. A295740). - Max Alekseyev, Nov 26 2017
Terms of the form 2^k - 2 corresponds to k in A296104. - Max Alekseyev, Dec 04 2017
From Bernard Schott, Oct 11 2021: (Start)
Two significant dates in the history of these terms:
1949: Derrick Henry Lehmer finds the smallest even pseudoprime to base 2, a(2) = 161038 (see Lehmer link).
1951: Dutch mathematician N. G. W. H. Beeger proves that the number of even pseudoprimes is infinite (see Beeger link). (End)

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 23.
  • J. Brillhart, D. H. Lehmer, J. L. Selfridge, B. Tuckerman, and S. S. Wagstaff, Jr., Factorizations of b^n+/-1 b=2, 3, 5, 6, 7, 10, 11, 12 up to high powers, Contemporary Math. v.22.
  • R. K. Guy, Unsolved Problems in Number Theory, A12.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 91.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

The even terms of A015919.
Cf. A295740.

Programs

Extensions

More terms from Robert G. Wilson v
Corrected by T. D. Noe, May 27 2003
b-file corrected by Max Alekseyev, Oct 09 2016

A062173 a(n) = 2^(n-1) mod n.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 1, 0, 4, 2, 1, 8, 1, 2, 4, 0, 1, 14, 1, 8, 4, 2, 1, 8, 16, 2, 13, 8, 1, 2, 1, 0, 4, 2, 9, 32, 1, 2, 4, 8, 1, 32, 1, 8, 31, 2, 1, 32, 15, 12, 4, 8, 1, 14, 49, 16, 4, 2, 1, 8, 1, 2, 4, 0, 16, 32, 1, 8, 4, 22, 1, 32, 1, 2, 34, 8, 9, 32, 1, 48, 40, 2, 1, 32, 16, 2, 4, 40, 1, 32, 64, 8, 4, 2, 54, 32, 1, 58, 58, 88, 1, 32, 1, 24, 46
Offset: 1

Views

Author

Henry Bottomley, Jun 12 2001

Keywords

Comments

If p is an odd prime then a(p)=1. However, a(n) is also 1 for pseudoprimes to base 2 such as 341.

Examples

			a(5) = 2^(5-1) mod 5 = 16 mod 5 = 1.
		

Crossrefs

Cf. A176997 (after the initial term, gives the positions of ones).

Programs

  • Haskell
    import Math.NumberTheory.Moduli (powerMod)
    a062173 n = powerMod 2 (n - 1) n  -- Reinhard Zumkeller, Oct 17 2015
    
  • Magma
    [Modexp(2,n-1,n): n in [1..110]]; // G. C. Greubel, Jan 11 2023
    
  • Mathematica
    Array[Mod[2^(# - 1), #] &, 105] (* Michael De Vlieger, Jul 01 2018 *)
    Array[PowerMod[2,#-1,#]&,120] (* Harvey P. Dale, May 17 2023 *)
  • PARI
    A062173(n) = if(1==n, 0, lift(Mod(2, n)^(n-1))); \\ Antti Karttunen, Jul 01 2018
    
  • SageMath
    [power_mod(2,n-1,n) for n in range(1,110)] # G. C. Greubel, Jan 11 2023

Formula

a(n) = A106262(2*n-3, n-2). - G. C. Greubel, Jan 11 2023

Extensions

More terms from Antti Karttunen, Jul 01 2018

A116622 Positive integers n such that 13^n == 2 (mod n).

Original entry on oeis.org

1, 11, 140711, 863101, 1856455, 115602923, 566411084209, 706836043419179
Offset: 1

Views

Author

Zak Seidov, Feb 19 2006

Keywords

Comments

No other terms below 10^16. - Max Alekseyev, Nov 02 2018

Crossrefs

Cf. A116609.
Solutions to b^n == 2 (mod n): A015919 (b=2), A276671 (b=3), A130421 (b=4), A124246 (b=5), A277401 (b=7), this sequence (b=13), A333269 (b=17).
Solutions to 13^n == k (mod n): A015963 (k=-1), A116621 (k=1), this sequence (k=2), A116629 (k=3), A116630 (k=4), A116611 (k=5), A116631 (k=6), A116632 (k=7), A295532 (k=8), A116636 (k=9), A116620 (k=10), A116638 (k=11), A116639 (k=15).

Programs

  • Mathematica
    Select[Range[1, 500000], Mod[13^#, #] == 2 &] (* G. C. Greubel, Nov 19 2017 *)
    Join[{1}, Select[Range[5000000], PowerMod[13, #, #] == 2 &]] (* Robert Price, Apr 10 2020 *)
  • PARI
    isok(n) = Mod(13, n)^n == 2; \\ Michel Marcus, Nov 19 2017

Extensions

One more term from Ryan Propper, Jun 11 2006
Term a(1)=1 is prepended and a(7)-a(8) are added by Max Alekseyev, Jun 29 2011

A158358 Pseudoprimes to base 2 that are not squarefree, including the even pseudoprimes.

Original entry on oeis.org

1194649, 12327121, 3914864773, 5654273717, 6523978189, 22178658685, 26092328809, 31310555641, 41747009305, 53053167441, 58706246509, 74795779241, 85667085141, 129816911251, 237865367741, 259621495381, 333967711897, 346157884801, 467032496113, 575310702877, 601401837037, 605767053061
Offset: 1

Views

Author

Rick L. Shepherd, Mar 16 2009

Keywords

Comments

Intersection of (A001567 U A006935) and A013929. Also, intersection of A015919 and A013929.
The first six terms are given by Ribenboim, who references calculations by Lehmer and by Pomerance, Selfridge & Wagstaff supporting "that the only possible factors p^2 (where p is a prime less than 6*10^9) of any pseudoprime, must be 1093 or 3511." Ribenboim states that the first four terms are strong pseudoprimes. The first two terms are squares of these Wieferich primes, 1093^2 and 3511^2.
Only Wieferich primes (A001220) can appear with an exponent greater than one. In particular, all members of this sequence are divisible by a square of a Wieferich prime. Up to 67 * 10^14 the only Wieferich primes are 1093 and 3511. - Charles R Greathouse IV, Sep 12 2012
The first term divisible by the squares of two (Wieferich) primes is a(11870) = 4578627124156945861 = 29 * 71 * 151 * 1093^2 * 3511^2. See A219346. - Charles R Greathouse IV, Sep 20 2012
Unless there are other Wieferich primes besides 1093 and 3511, the sequence is the union of A247830 and A247831. - Max Alekseyev, Nov 26 2017
The even terms are listed in A295740. - Max Alekseyev, Nov 26 2017 [Their indices in this sequence are 2882, 3476, 3573, 4692, 5434, 5581, 6332, 8349, 8681, 9515, ... - Jianing Song, Feb 08 2019]

Examples

			a(6) = 22178658685 = 5 * 47 * 79 * 1093^2 is a pseudoprime that is not squarefree.
		

References

  • P. Ribenboim, The Little Book of Big Primes. Springer-Verlag, NY, 1991, pp. 77, 83, 167.

Crossrefs

Programs

  • PARI
    list(lim)=vecsort(concat(concat(apply(p->select(n->Mod(2, n)^(n-1)==1, p^2*vector(lim\p^2\2, i, 2*i-1)), [1093, 3511])), select(n->Mod(2, n)^n==2, 2*3511^2*vector(lim\3511^2\2, i, i))), , 8) \\ valid up to 4.489 * 10^31, Charles R Greathouse IV, Sep 12 2012, changed to include the even terms by Jianing Song, Feb 07 2019

Extensions

More terms from Max Alekseyev, May 09 2010
Name changed by Jianing Song, Feb 07 2019 to include the even pseudoprimes to base 2 (A006935) as was suggested by Max Alekseyev.

A014741 Numbers k such that k divides 2^(k+1) - 2.

Original entry on oeis.org

1, 2, 6, 18, 42, 54, 126, 162, 294, 342, 378, 486, 882, 1026, 1134, 1314, 1458, 1806, 2058, 2394, 2646, 3078, 3402, 3942, 4374, 5334, 5418, 6174, 6498, 7182, 7938, 9198, 9234, 10206, 11826, 12642, 13122, 14154, 14406, 16002, 16254
Offset: 1

Views

Author

Keywords

Comments

Also, numbers k such that k divides Eulerian number A000295(k+1) = 2^(k+1) - k - 2.
Also, numbers k such that k divides A086787(k) = Sum_{i=1..k} Sum_{j=1..k} i^j.
All terms greater than 1 are even; for a proof, see comment in A036236. - Max Alekseyev, Feb 03 2012
If k>1 is a term, then 3*k is also a term. - Alexander Adamchuk, Nov 03 2006
Prime numbers of the form a(m)+1 are given by A069051. - Max Alekseyev, Nov 14 2012
The number 2^m - 2 is a term of this sequence if and only if m - 1 is a term. - Thomas Ordowski, Jul 01 2024

Crossrefs

Programs

Formula

For n > 1, a(n) = 2*A014945(n-1). - Max Alekseyev, Nov 14 2012

A176997 Integers k such that 2^(k-1) == 1 (mod k).

Original entry on oeis.org

1, 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
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 08 2010

Keywords

Comments

Old definition was: Odd integers n such that 2^(n-1) == 4^(n-1) == 8^(n-1) == ... == k^(n-1) (mod n), where k = A062383(n). Dividing 2^(n-1) == 4^(n-1) (mod n) by 2^(n-1), we get 1 == 2^(n-1) (mod n), implying the current definition. - Max Alekseyev, Sep 22 2016
The union of {1}, the odd primes, and the Fermat pseudoprimes, i.e., {1} U A065091 U A001567. Also, the union of A006005 and A001567 (conjectured by Alois P. Heinz, Dec 10 2010). - Max Alekseyev, Sep 22 2016
These numbers were called "fermatians" by Shanks (1962). - Amiram Eldar, Apr 21 2024

Examples

			5 is in the sequence because 2^(5-1) == 4^(5-1) == 8^(5-1) == 1 (mod 5).
		

References

  • Daniel Shanks, Solved and Unsolved Problems in Number Theory, Spartan Books, Washington D.C., 1962.

Crossrefs

The odd terms of A015919.
Odd integers n such that 2^n == 2^k (mod n): this sequence (k=1), A173572 (k=2), A276967 (k=3), A033984 (k=4), A276968 (k=5), A215610 (k=6), A276969 (k=7), A215611 (k=8), A276970 (k=9), A215612 (k=10), A276971 (k=11), A215613 (k=12).

Programs

  • Mathematica
    m = 1; Join[Select[Range[m], Divisible[2^(# - 1) - m, #] &],
    Select[Range[m + 1, 10^3], PowerMod[2, # - 1, #] == m &]] (* Robert Price, Oct 12 2018 *)
  • PARI
    isok(n) = Mod(2, n)^(n-1) == 1; \\ Michel Marcus, Sep 23 2016
    
  • Python
    from itertools import count, islice
    def A176997_gen(startvalue=1): # generator of terms >= startvalue
        if startvalue <= 1:
            yield 1
        k = 1<<(s:=max(startvalue,1))-1
        for n in count(s):
            if k % n == 1:
                yield n
            k <<= 1
    A176997_list = list(islice(A176997_gen(),30)) # Chai Wah Wu, Jun 30 2022

Extensions

Edited by Max Alekseyev, Sep 22 2016

A128122 Numbers m such that 2^m == 6 (mod m).

Original entry on oeis.org

1, 2, 10669, 6611474, 43070220513807782
Offset: 1

Views

Author

Alexander Adamchuk, Feb 15 2007

Keywords

Comments

No other terms below 10^17. - Max Alekseyev, Nov 18 2022
A large term: 862*(2^861-3)/281437921287063162726198552345362315020202285185118249390789 (203 digits). - Max Alekseyev, Sep 24 2016

Examples

			2 == 6 (mod 1), so 1 is a term;
4 == 6 (mod 2), so 2 is a term.
		

Crossrefs

Solutions to 2^m == k (mod m): A000079 (k=0),A187787 (k=1/2), A296369 (k=-1/2), A006521 (k=-1), A296370 (k=3/2), A015919 (k=2), A006517 (k=-2), A050259 (k=3), A015940 (k=-3), A015921 (k=4), A244673 (k=-4), A128121 (k=5), A245318 (k=-5), this sequence (k=6), A245728 (k=-6), A033981 (k=7), A240941 (k=-7), A015922 (k=8), A245319 (k=-8), A051447 (k=9), A240942 (k=-9), A128123 (k=10), A245594 (k=-10), A033982 (k=11), A128124 (k=12), A051446 (k=13), A128125 (k=14), A033983 (k=15), A015924 (k=16), A124974 (k=17), A128126 (k=18), A125000 (k=19), A015925 (k=2^5), A015926 (k=2^6), A015927 (k=2^7), A015929 (k=2^8), A015931 (k=2^9), A015932 (k=2^10), A015935 (k=2^11), A015937 (k=2^12)

Programs

  • Mathematica
    m = 6; Join[Select[Range[m], Divisible[2^# - m, #] &],
    Select[Range[m + 1, 10^6], PowerMod[2, #, #] == m &]] (* Robert Price, Oct 08 2018 *)

Extensions

1 and 2 added by N. J. A. Sloane, Apr 23 2007
a(5) from Max Alekseyev, Nov 18 2022

A296369 Numbers m such that 2^m == -1/2 (mod m).

Original entry on oeis.org

1, 5, 65, 377, 1189, 1469, 25805, 58589, 134945, 137345, 170585, 272609, 285389, 420209, 538733, 592409, 618449, 680705, 778805, 1163065, 1520441, 1700945, 2099201, 2831009, 4020029, 4174169, 4516109, 5059889, 5215769
Offset: 1

Views

Author

Max Alekseyev, Dec 10 2017

Keywords

Comments

Equivalently, 2^(m+1) == -1 (mod m), or m divides 2^(m+1) + 1.
The sequence is infinite, see A055685.

Crossrefs

Solutions to 2^m == k (mod m): A296370 (k=3/2), A187787 (k=1/2), this sequence (k=-1/2), A000079 (k=0), A006521 (k=-1), A015919 (k=2), A006517 (k=-2), A050259 (k=3), A015940 (k=-3), A015921 (k=4), A244673 (k=-4), A128121 (k=5), A245318 (k=-5), A128122 (k=6), A245728 (k=-6), A033981 (k=7), A240941 (k=-7), A015922 (k=8), A245319 (k=-8), A051447 (k=9), A240942 (k=-9), A128123 (k=10), A245594 (k=-10), A033982 (k=11), A128124 (k=12), A051446 (k=13), A128125 (k=14), A033983 (k=15), A015924 (k=16), A124974 (k=17), A128126 (k=18), A125000 (k=19), A015925 (k=2^5), A015926 (k=2^6), A015927 (k=2^7), A015929 (k=2^8), A015931 (k=2^9), A015932 (k=2^10), A015935 (k=2^11), A015937 (k=2^12)

Programs

  • Mathematica
    Select[Range[10^5], Divisible[2^(# + 1) + 1, #] &] (* Robert Price, Oct 11 2018 *)
  • Python
    A296369_list = [n for n in range(1,10**6) if pow(2,n+1,n) == n-1] # Chai Wah Wu, Nov 04 2019

Formula

a(n) = A055685(n) - 1.

Extensions

Incorrect term 4285389 removed by Chai Wah Wu, Nov 04 2019

A216822 Numbers n such that 2^n == 2 (mod n*(n+1)).

Original entry on oeis.org

1, 5, 13, 29, 37, 61, 73, 157, 181, 193, 277, 313, 397, 421, 457, 541, 561, 613, 661, 673, 733, 757, 877, 997, 1093, 1153, 1201, 1213, 1237, 1289, 1321, 1381, 1453, 1621, 1657, 1753, 1873, 1905, 1933, 1993, 2017, 2137, 2341, 2473, 2557, 2593, 2797, 2857, 2917
Offset: 1

Views

Author

V. Raman, Sep 17 2012

Keywords

Comments

a(17) = 561 is the first composite number in the sequence. - Charles R Greathouse IV, Sep 19 2012
Intersection of { A015919(n) } and { A192109(n)-1 }. - Max Alekseyev, Apr 22 2013

Crossrefs

Cf. A069051 (prime n such that 2^n == 2 (mod n*(n-1))).
Cf. A217466 (prime terms of the sequence).
Cf. A217465 (composite terms of the sequence)

Programs

  • Mathematica
    Select[Range[1, 10000], Mod[2^# - 2, # (# + 1)] == 0 &] (* T. D. Noe, Sep 19 2012 *)
    Join[{1},Select[Range[3000],PowerMod[2,#,#(#+1)]==2&]] (* Harvey P. Dale, Oct 05 2022 *)
  • PARI
    is(n)=Mod(2,n*(n+1))^n==2; \\ Charles R Greathouse IV, Sep 19 2012
    
  • Python
    A216822_list = [n for n in range(1,10**6) if n == 1 or pow(2,n,n*(n+1)) == 2] # Chai Wah Wu, Mar 25 2021

Extensions

a(1)=1 prepended by Max Alekseyev, Dec 29 2017
Showing 1-10 of 31 results. Next