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.

A215417 Primes that remain prime when a single zero digit is inserted between any two adjacent digits.

Original entry on oeis.org

11, 13, 17, 19, 37, 41, 53, 59, 61, 67, 71, 79, 89, 97, 109, 113, 131, 149, 191, 197, 227, 239, 269, 281, 283, 337, 367, 379, 383, 401, 421, 449, 457, 499, 503, 509, 587, 607, 673, 701, 719, 727, 739, 757, 809, 811, 887, 907, 929, 991, 1009, 1061, 1093, 1103
Offset: 1

Views

Author

Paolo P. Lava, Aug 10 2012

Keywords

Examples

			399617 is prime and also 3996107, 3996017, 3990617, 3909617, 3099617.
		

Crossrefs

Programs

  • Maple
    A215417:=proc(q)
    local a,b,c,i,n,ok;
    for n from 5 to q do
      a:=ithprime(n); b:=0; while a>0 do b:=b+1; a:=trunc(a/10); od;
      a:=ithprime(n);ok:=1;
      for i from 1 to b-1 do
        c:=a+9*10^i*trunc(a/10^i); if not isprime(c) then ok:=0; break; fi;
      od;
      if ok=1 then print(ithprime(n)); fi;
    od; end:
    A215417(1000);
  • Mathematica
    Select[Prime[Range[5,200]],And@@PrimeQ[Table[FromDigits[Insert[ IntegerDigits[ #],0,n]],{n,2,IntegerLength[#]}]]&] (* Harvey P. Dale, Feb 23 2014 *)
  • PARI
    is(n)=my(v=concat([""], digits(n))); for(i=2, #v-1, v[1]=Str(v[1], v[i]); v[i]=0; if(i>2, v[i-1]=""); if(!isprime(eval(concat(v))), return(0))); isprime(n) \\ Charles R Greathouse IV, Sep 26 2012