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 10 results.

A105982 Near-repdigit primes with at least two 2's as the repeated digit.

Original entry on oeis.org

223, 227, 229, 2221, 22229, 22222223, 222222227, 22222222223, 22222222222229, 222222222222227, 222222222222222221, 2222222222222222222222222227, 222222222222222222222222222222222223
Offset: 1

Views

Author

Shyam Sunder Gupta, Apr 29 2005

Keywords

Examples

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

Crossrefs

Extensions

Name clarified by Robert Price, Sep 10 2023

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

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

A316787 Semipermutable Primes: One-digit primes and primes with 2 or more digits such that all permutations of their digits are primes except for permutations that place either 5 or even numbers in the units digit.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 107, 113, 131, 149, 181, 199, 223, 227, 229, 241, 251, 277, 281, 283, 311, 337, 373, 401, 419, 421, 443, 449, 457, 461, 463, 467, 491, 503, 509, 521, 547, 557, 563, 569, 577, 587, 601, 607
Offset: 1

Views

Author

Enrique Navarrete, Jul 13 2018

Keywords

Comments

Supersequence of A003459. The motivation of the sequence is to fill gaps in A003459.
The sequence contains all 1-digit primes, 20 2-digit primes (i.e., all 2-digit primes except 19), as opposed to only 9 2-digit primes in A003459, and 66 3-digit primes (as opposed to only 9 3-digit primes in A003459).
Also, the sequence contains 4-digit primes such as 4441 but also nontrivial ones such as 1181, 1811, 8111, which form an orbit of size 3 (see below), while there are no 4-digit primes in A003459.
If we call orbits the primes that can be obtained by such permutations, there are orbits of sizes 1,2,3, and 4 up to 3-digit primes.
In fact, there are only 3 orbits of size 4 up to 3-digit primes: {107, 17, 71, 701}, {149, 419, 491, 941} and {709, 79, 97, 907}.
It appears that there are no orbits of sizes larger than 4 for n-digit primes.
Permutations that have leading 0's are included: thus 409 is not in the sequence because 49 is not prime. - Robert Israel, Aug 31 2018

Examples

			127 is not in the sequence since 271 is prime but neither 217 nor 721 are; to be in the sequence all of these numbers would have to be prime, and they would form an orbit of size 4 (by Name, permutations of these numbers ending in 2 are not considered).
241 and 421 are in the sequence and form an orbit of size 2 since these primes can be obtained by permutations that forbid the units digit to be an even number.
569 and 659 are in the sequence since these primes can be obtained by permutations that forbid the units digit to be either 5 or an even number.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L,m,i,t;
      if not isprime(n) then return false fi;
      L:= convert(n,base,10);
      m:=nops(L);
      for i in select(t -> member(L[t],[1,3,7,9]), [$1..m]) do
        for t in combinat:-permute(subsop(i=NULL, L)) do
          if not isprime(L[i]+add(10^j*t[j],j=1..m-1)) then
            return false fi
      od od;
      true
    end proc:
    select(filter, [2,seq(i,i=3..2000,2)]); # Robert Israel, Aug 31 2018
  • Mathematica
    Select[Prime@Range[120], AllTrue[FromDigits /@ Permutations[IntegerDigits@ #], PrimeQ[#] || MemberQ[{0, 2, 4, 5, 6, 8}, Mod[#, 10]] &] &] (* Giovanni Resta, Jul 14 2018 *)

A178003 Largest n-digit prime with the most digits equal to 5.

Original entry on oeis.org

5, 59, 557, 5557, 75557, 555557, 9555551, 55555559, 855555559, 5555555557, 75555555557, 555555555559, 5555555555551, 59555555555557, 555555555555557, 6555555555555553, 55556555555555557, 555555555555555559
Offset: 1

Views

Author

Lekraj Beedassy, May 17 2010

Keywords

Comments

Select first for the most 5's, then take the largest.

Crossrefs

Showing 1-10 of 10 results.