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.

A068645 Primes in which a string of 3's is sandwiched between two 1's.

Original entry on oeis.org

11, 131, 13331, 1333331, 13333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333331
Offset: 1

Views

Author

Amarnath Murthy, Feb 28 2002

Keywords

Comments

a(5) consists of 93 and a(6) consists of 159 3's sandwiched between two 1's. - Sascha Kurz, Mar 26 2002
a(8) has 1471 digits. - Michael S. Branicky, Jan 27 2023

Crossrefs

Programs

  • Mathematica
     Select[Flatten[Table[10*FromDigits[PadRight[{1},n,3]]+1,{n,120}]],PrimeQ] (* Harvey P. Dale, Aug 09 2020 *)
  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen(): yield from (t for i in count(0) if isprime(t:=int("1" + "3"*i + "1")))
    print(list(islice(agen(), 7))) # Michael S. Branicky, Jan 27 2023

Extensions

More terms from Sascha Kurz, Mar 26 2002
Edited by Ray Chandler, Nov 04 2014