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

A105976 Near-repdigit primes with at least two 8's as the repeated digit.

Original entry on oeis.org

881, 883, 887, 8887, 88883, 888887, 88888883, 888888883, 888888887, 888888888887, 88888888888889, 888888888888883, 88888888888888889, 8888888888888888881, 88888888888888888888888888888888889
Offset: 1

Views

Author

Shyam Sunder Gupta, Apr 29 2005

Keywords

Examples

			a(2)=883 is a term because all digits are equal to 8 except one.
		

Crossrefs

Extensions

Name clarified by Robert Price, Sep 10 2023

A105978 Near-repdigit primes with at least two 6's as the repeated digit.

Original entry on oeis.org

661, 6661, 666667, 66666667, 666666667, 6666666661, 66666666667, 666666666666666661, 66666666666666666667, 666666666666666666661, 6666666666666666666661, 66666666666666666666667, 6666666666666666666666666661
Offset: 1

Views

Author

Shyam Sunder Gupta, Apr 29 2005

Keywords

Examples

			a(2)=6661 is a term because all digits are equal to 6 except one.
		

Crossrefs

Programs

  • Mathematica
    Select[FromDigits/@Flatten[Table[PadLeft[{pd},n,6],{pd,{1,7}},{n,3,30}],1],PrimeQ]//Sort (* Harvey P. Dale, Sep 01 2021 *)

Extensions

More terms from Harvey P. Dale, Sep 01 2021
Name clarified by Robert Price, Sep 10 2023

A105980 Near-repdigit primes with at least two 4's as the repeated digit.

Original entry on oeis.org

443, 449, 4441, 4447, 44449, 444443, 444449, 444444443, 4444444447, 44444444441, 444444444443, 44444444444444444447, 44444444444444444444444447, 4444444444444444444444444441, 444444444444444444444444444443
Offset: 1

Views

Author

Shyam Sunder Gupta, Apr 29 2005

Keywords

Examples

			a(2)=449 is a term because all digits are equal to 4 except one.
		

Crossrefs

Programs

  • Mathematica
    Select[Flatten[Table[FromDigits[PadLeft[{n},x,4]],{x,3,30},{n,{1,3,7,9}}]],PrimeQ] (* Harvey P. Dale, Feb 18 2018 *)

Extensions

More terms from Harvey P. Dale, Feb 18 2018
Name clarified by Robert Price, Sep 10 2023

A105979 Near-repdigit primes with at least two 5's as the repeated digit.

Original entry on oeis.org

557, 5557, 555557, 55555553, 55555559, 5555555557, 555555555551, 555555555559, 5555555555551, 555555555555557, 555555555555555559, 5555555555555555555557, 55555555555555555555555553, 55555555555555555555555559, 55555555555555555555555555555559
Offset: 1

Views

Author

Shyam Sunder Gupta, Apr 29 2005

Keywords

Examples

			5557 is a term because all digits are equal to 5 except one.
		

Crossrefs

Extensions

Name clarified by Robert Price, Sep 10 2023

A365592 Near-repdigit primes with at least two 1's as the repeated digit.

Original entry on oeis.org

113, 1117, 11113, 11117, 11119, 111119, 11111117, 11111119, 111111113, 11111111113, 11111111111111119, 1111111111111111111, 11111111111111111111111, 11111111111111111111117, 111111111111111111111113, 11111111111111111111111111117
Offset: 1

Views

Author

Robert Price, Sep 10 2023

Keywords

Examples

			1117 is a term because all digits are equal to 1 except the last one.
		

Crossrefs

A365596 Near-repdigit primes with at least two 3's as the repeated digit.

Original entry on oeis.org

331, 337, 3331, 33331, 333331, 333337, 3333331, 33333331, 333333333333333331, 3333333333333333333333333333333333333331, 3333333333333333333333333333333333333333333337, 33333333333333333333333333333333333333333333333331
Offset: 1

Views

Author

Robert Price, Sep 10 2023

Keywords

Examples

			3331 is a term because all digits are equal to 3 except the last one.
		

Crossrefs

A365597 Near-repdigit primes with at least two 7's as the repeated digit.

Original entry on oeis.org

773, 77773, 777777773, 777777777773, 7777777777771, 777777777777773, 77777777777777777771, 777777777777777777773, 77777777777777777777771, 7777777777777777777777777777771
Offset: 1

Views

Author

Robert Price, Sep 10 2023

Keywords

Examples

			77773 is a term because all digits are equal to 7 except the last one.
		

Crossrefs

A365598 Near-repdigit primes with at least two 9's as the repeated digit, and ending in a distinct digit.

Original entry on oeis.org

991, 997, 99991, 9999991, 99999999999999997, 999999999999999999999999999999991, 999999999999999999999999999999999999999999991
Offset: 1

Views

Author

Robert Price, Sep 10 2023

Keywords

Comments

The usual definition of near-repdigit prime allows the distinct digit to be in any position, see A105975 for that (super) sequence.

Examples

			99991 is a term because all digits are equal to 9 except the last one.
		

Crossrefs

Programs

  • Maple
    R:= NULL: count:= 0:
    for n from 3 to 999 do
      for d in [9,3] do
        if isprime(10^n - d) then
          R:= R, 10^n-d; count:= count+1;
        fi
    od od:
    R;

Extensions

Definition corrected by M. F. Hasler, Jun 20 2025

A088281 a(1) = 11; for n > 1, palindromic primes in which a single digit is sandwiched between strings of '1's.

Original entry on oeis.org

11, 101, 131, 151, 181, 191, 11311, 11411, 1114111, 1117111, 111181111, 111191111, 1111118111111, 111111151111111, 111111181111111, 111111111161111111111, 11111111111111611111111111111, 111111111111111111131111111111111111111, 11111111111111111111111111911111111111111111111111111
Offset: 0

Views

Author

Amarnath Murthy, Sep 29 2003

Keywords

Comments

For n > 1, near-repunit palindromic primes (or, palindromic terms of A105992). - Lekraj Beedassy, Jun 05 2009

Crossrefs

Cf. A088282, A088283, A088284 (analog with string of '3's, '7's resp. '9's).
Cf. A105992 (near-repunit primes), A065074 (which contain the digit 0), A034093 (number of primes by changing one 1 to 0), A065083 (least k for which that = n).
Cf. A164937 (near-repdigit primes); with 2, ..., 9 as repeated digit: A105982, A105981, A105980, A105979, A105978, A105977, A105976, A105975.

Programs

  • Mathematica
    Join[{11},Select[Flatten[Table[FromDigits[Join[PadRight[{},n,1],{d},PadRight[{},n,1]]],{n,26},{d,Cases[Range[0,9],Except[1]]}]],PrimeQ]] (* Harvey P. Dale, Nov 04 2024 *)
  • PARI
    print1(11); for(L=1,19,for(d=0,9,d!=1 && ispseudoprime(p=10^(2*L+1)\9+(d-1)*10^L) && print1(","p))) \\ M. F. Hasler, Feb 07 2020

Extensions

More terms from David Wasserman, Aug 03 2005
Offset changed from 0 to 1 by Lekraj Beedassy, Jun 05 2009
Edited by M. F. Hasler, Feb 07 2020

A164937 Near-repdigit primes.

Original entry on oeis.org

101, 113, 131, 151, 181, 191, 199, 211, 223, 227, 229, 233, 277, 311, 313, 331, 337, 353, 373, 383, 433, 443, 449, 499, 557, 577, 599, 661, 677, 727, 733, 757, 773, 787, 797, 811, 877, 881, 883, 887, 911, 919, 929, 977, 991, 997, 1117, 1151, 1171, 1181, 1511
Offset: 1

Views

Author

G. L. Honaker, Jr., Aug 31 2009

Keywords

Crossrefs

Programs

  • Mathematica
    lst = {}; Do[If[PrimeQ[n] && SortBy[Tally[IntegerDigits[n]], Last][[-1, -1]] == IntegerLength[n] - 1, AppendTo[lst, n]], {n, 101, 10^3}]; lst (* Arkadiusz Wesolowski, Sep 18 2011 *)
    lst = {}; Do[r = (10^n - 1)/9; Do[AppendTo[lst, DeleteCases[Select[FromDigits[Permutations[Append[IntegerDigits[a*r], d]]], PrimeQ], r | 2 | 3 | 5 | 7]], {a, 9}, {d, 0, 9}], {n, 2, 6}]; Sort[Flatten[lst]] (* Arkadiusz Wesolowski, Sep 22 2011 *)
  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen(): # generator of terms
        for d in count(3):
            ds = set()
            for end in "1379":
                ds.update(int(c*(d-1) + end) for c in "123456789" if c != end)
                for diff in "0123456789":
                    if end == diff: continue
                    cands = (end*i + diff + end*(d-1-i) for i in range(d-1))
                    ds.update(int(t) for t in cands if t[0] != "0")
            yield from sorted(t for t in ds if isprime(t))
    print(list(islice(agen(), 52))) # Michael S. Branicky, May 17 2022

Extensions

Three more terms from Lekraj Beedassy, Dec 06 2009
Showing 1-10 of 13 results. Next