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

A068685 Primes which are a sandwich of numbers using at most one digit between two 1's.

Original entry on oeis.org

11, 101, 131, 151, 181, 191, 13331, 15551, 16661, 19991, 1333331, 1444441, 1777771, 188888881, 199999991, 1666666666661, 188888888888881, 16666666666666661, 1111111111111111111, 1666666666666666661, 155555555555555555551, 11111111111111111111111
Offset: 1

Views

Author

Amarnath Murthy, Mar 02 2002

Keywords

Comments

a(47) has 1003 digits. - Michael S. Branicky, Jan 28 2023

Examples

			11 is a member sandwiching nothing between two 1's. 13331 is a sandwich using 333.
		

Crossrefs

Cf. A068683.

Programs

  • Mathematica
    Select[Union[Flatten[Table[FromDigits[Join[{1},PadRight[{},n,i],{1}]], {n,0,20},{i,0,9}]]],PrimeQ] (* Harvey P. Dale, Mar 29 2012 *)
  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen(): yield 11; yield from (t for i in count(1) for m in "0123456789" if isprime(t:=int("1" + m*i + "1")))
    print(list(islice(agen(), 30))) # Michael S. Branicky, Jan 28 2023

Extensions

More terms from Sascha Kurz, Mar 17 2002
a(21) and beyond from Michael S. Branicky, Jan 28 2023

A068684 Primes obtained as a concatenation p,q,p where p and q are successive primes and p

Original entry on oeis.org

353, 131713, 171917, 192319, 293129, 374137, 434743, 596159, 677167, 139149139, 163167163, 179181179, 223227223, 229233229, 269271269, 281283281, 347349347, 379383379, 547557547, 683691683, 761769761, 857859857, 863877863, 102110311021, 103910491039, 108710911087, 109110931091, 109310971093
Offset: 1

Views

Author

Amarnath Murthy, Mar 02 2002

Keywords

Examples

			171917 is a prime which is the concatenation of 17, 19 and 17.
		

Crossrefs

Programs

  • Maple
    cat3:= proc(a,b,c) local alpha,beta;
        beta:= ilog10(c)+1;
        alpha:= beta + ilog10(b)+1;
        10^alpha*a + 10^beta*b + c
    end proc:
    R:= NULL: count:= 0: q:= 2:
    while count < 100 do
      p:= q; q:= nextprime(q);
      v:= cat3(p,q,p);
      if isprime(v) then R:= R,v; count:= count+1;
      fi
    od:
    R; # Robert Israel, Jul 01 2025
  • PARI
    f(n)=prime(n)*(10^(ceil(log(prime(n+1))/log(10))+ceil(log(prime(n))/log(10))))+ prime(n+1)*10^ceil(log(prime(n))/log(10))+prime(n);
    for(n=1,300, if(isprime(f(n))==1, print1(f(n),", ")))

Extensions

More terms from Benoit Cloitre, Mar 21 2002
More terms from Robert Israel, Jul 02 2025
Showing 1-2 of 2 results.