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 A217063 #22 Mar 08 2024 11:59:05 %S A217063 11,17,19,23,29,31,37,41,43,61,73,79,89,97,101,103,127,167,173,181, %T A217063 211,233,239,251,271,283,307,331,359,373,439,491,509,523,547,599,673, %U A217063 709,733,769,877,887,937,941,991,1033,1229,1381,1619,1721,1759,1789,1901 %N A217063 Primes that remain prime when a single "3" digit is inserted between any two adjacent decimal digits. %H A217063 Bruno Berselli, <a href="/A217063/b217063.txt">Table of n, a(n) for n = 1..1000</a> (first 275 terms from Paolo Lava) %e A217063 212881 is prime and also 2128831, 2128381, 2123881, 213288 and 2312881. %p A217063 with(numtheory); %p A217063 A217063:=proc(q,x) %p A217063 local a,b,c,i,n,ok; %p A217063 for n from 5 to q do %p A217063 a:=ithprime(n); b:=0; while a>0 do b:=b+1; a:=trunc(a/10); od; a:=ithprime(n); ok:=1; %p A217063 for i from 1 to b-1 do %p A217063 c:=a+9*10^i*trunc(a/10^i)+10^i*x; if not isprime(c) then ok:=0; break; fi; od; %p A217063 if ok=1 then print(ithprime(n)); fi; od; end: %p A217063 A217063(1000000,3); %o A217063 (Magma) [p: p in PrimesInInterval(11, 2000) | forall{m: t in [1..#Intseq(p)-1] | IsPrime(m) where m is (Floor(p/10^t)*10+3)*10^t+p mod 10^t}]; // _Bruno Berselli_, Sep 26 2012 %o A217063 (PARI) is(n)=my(v=concat([""], digits(n))); for(i=2, #v-1, v[1]=Str(v[1], v[i]); v[i]=3; if(i>2, v[i-1]=""); if(!isprime(eval(concat(v))), return(0))); isprime(n) \\ _Charles R Greathouse IV_, Sep 26 2012 %o A217063 (Python) %o A217063 from sympy import isprime, primerange %o A217063 def ok(p): %o A217063 if p < 10: return False %o A217063 s = str(p) %o A217063 return all(isprime(int(s[:i] + "3" + s[i:])) for i in range(1, len(s))) %o A217063 def aupto(limit): return [p for p in primerange(1, limit+1) if ok(p)] %o A217063 print(aupto(1901)) # _Michael S. Branicky_, Nov 17 2021 %Y A217063 Cf. A050674, A050711-A050719, A069246, A159236, A215417, A215419-A215421, A217044-A217047, A217062-A217065. %K A217063 nonn,base %O A217063 1,1 %A A217063 _Paolo P. Lava_, Sep 26 2012