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.

A217062 Primes that remain prime when a single "9" digit is inserted between any two adjacent digits.

This page as a plain text file.
%I A217062 #10 Sep 26 2012 12:04:52
%S A217062 11,13,17,19,23,37,41,53,59,61,97,101,107,113,149,193,197,199,227,239,
%T A217062 263,269,271,311,331,367,409,431,443,457,499,587,617,659,661,691,727,
%U A217062 733,751,823,863,941,967,1009,1423,1571,1709,1759,1973,1993,1997,2063,2137
%N A217062 Primes that remain prime when a single "9" digit is inserted between any two adjacent digits.
%H A217062 Paolo P. Lava, <a href="/A217062/b217062.txt">Table of n, a(n) for n = 1..236</a>
%e A217062 214883 is prime and also 2148893, 2148983, 2149883, 2194883 and 2914883.
%p A217062 with(numtheory);
%p A217062 A217062:=proc(q,x)
%p A217062 local a,b,c,i,n,ok;
%p A217062 for n from 5 to q do
%p A217062   a:=ithprime(n); b:=0; while a>0 do b:=b+1; a:=trunc(a/10); od; a:=ithprime(n); ok:=1;
%p A217062     for i from 1 to b-1 do
%p A217062       c:=a+9*10^i*trunc(a/10^i)+10^i*x;  if not isprime(c) then ok:=0; break; fi; od;
%p A217062     if ok=1 then print(ithprime(n)); fi; od; end:
%p A217062 A217062(1000000,9);
%o A217062 (PARI) is(n)=my(v=concat([""], digits(n))); for(i=2, #v-1, v[1]=Str(v[1], v[i]); v[i]=9; if(i>2, v[i-1]=""); if(!isprime(eval(concat(v))), return(0))); isprime(n) \\ _Charles R Greathouse IV_, Sep 26 2012
%Y A217062 Cf. A050674, A050711-A050719, A069246, A159236, A215417, A215419-A215421, A217044-A217047, A217063-A217065
%K A217062 nonn,base
%O A217062 1,1
%A A217062 _Paolo P. Lava_, Sep 26 2012