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-3 of 3 results.

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

A178005 Largest n-digit prime with the most digits equal to 7.

Original entry on oeis.org

7, 97, 977, 7877, 97777, 787777, 7877777, 77767777, 787777777, 8777777777, 79777777777, 777777779777, 7877777777777, 77777779777777, 778777777777777, 8777777777777777, 77797777777777777, 797777777777777777
Offset: 1

Views

Author

Lekraj Beedassy, May 17 2010

Keywords

Comments

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

Crossrefs

Showing 1-3 of 3 results.