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.

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