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.
%I A217046 #19 Mar 08 2024 11:58:59 %S A217046 13,17,23,29,37,41,43,47,53,59,61,71,79,83,97,101,109,113,137,157,163, %T A217046 167,263,277,293,307,313,317,331,397,421,443,457,463,569,607,653,659, %U A217046 661,673,691,739,769,787,809,823,829,863,881,977,997,1063,1087,1453 %N A217046 Primes that remain prime when a single "6" digit is inserted between any two adjacent decimal digits. %H A217046 Harvey P. Dale, <a href="/A217046/b217046.txt">Table of n, a(n) for n = 1..500</a> (First 262 terms from Paolo P. Lava) %e A217046 185917 is prime and also 1859167, 1859617, 1856917, 1865917 and 1685917. %p A217046 with(numtheory); %p A217046 A217044:=proc(q,x) %p A217046 local a,b,c,i,n,ok; %p A217046 for n from 5 to q do %p A217046 a:=ithprime(n); b:=0; %p A217046 while a>0 do b:=b+1; a:=trunc(a/10); od; a:=ithprime(n); ok:=1; %p A217046 for i from 1 to b-1 do %p A217046 c:=a+9*10^i*trunc(a/10^i)+10^i*x; %p A217046 if not isprime(c) then ok:=0; break; fi; od; %p A217046 if ok=1 then print(ithprime(n)); fi; %p A217046 od; end: %p A217046 A217044(100000,6) %t A217046 Select[Prime[Range[5,1200]],And@@PrimeQ[FromDigits/@Table[ Insert[ IntegerDigits[ #],6,i],{i,2,IntegerLength[#]}]]&] (* _Harvey P. Dale_, Oct 09 2012 *) %o A217046 (PARI) is(n)=my(v=concat([""], digits(n))); for(i=2, #v-1, v[1]=Str(v[1], v[i]); v[i]=6; if(i>2, v[i-1]=""); if(!isprime(eval(concat(v))), return(0))); isprime(n) \\ _Charles R Greathouse IV_, Sep 26 2012 %Y A217046 Cf. A050674, A050711-A050719, A069246, A159236, A215417, A215419-A215421, A217044, A217045, A217047, A217062-A217065 %K A217046 nonn,base %O A217046 1,1 %A A217046 _Paolo P. Lava_, Sep 25 2012