%I #16 Jul 24 2013 12:48:39
%S 1,49,91,1117,2929,3001,4831,37237,43897,54409,55669,81931,89809,
%T 194971,271159,556651,628069,639247,1036447,1615597,2075407,2086447,
%U 2414077,3331009,3442789,4088539,4178311,4330681,5834869,6846649,7928047,11222341,15520927,18575911,18615787,22426969,22645189
%N Smallest k such that (10^n+k, 10^n+k+2) and (10^(n+1)+k, 10^(n+1)+k+2) are two pairs of twin primes with k(n+1) > k(n).
%H Pierre CAMI, <a href="/A224846/b224846.txt">Table of n, a(n) for n = 1..75</a>
%e 10^1+1=11 prime as 13 10^2+1=101 prime as 103 so a(1)=1.
%t i = -1; Table[i = i + 2; While[! (PrimeQ[10^n + i] && PrimeQ[10^n + i + 2] && PrimeQ[10^(n + 1) + i] && PrimeQ[10^(n + 1) + i + 2]), i = i + 2]; i, {n, 10}] (* _T. D. Noe_, Jul 23 2013 *)
%o PFGW & SCRIPTIFY
%o SCRIPT
%o DIM n,0
%o DIM k,-1
%o DIMS t
%o OPENFILEOUT myf,a(n).txt
%o LABEL a
%o SET n,n+1
%o LABEL b
%o SET k,k+2
%o SETS t,%d,%d\,;n;k
%o PRP 10^n+k,t
%o IF ISPRP THEN GOTO c
%o GOTO b
%o LABEL c
%o PRP 10^n+k+2,t
%o IF ISPRP THEN GOTO d
%o GOTO b
%o LABEL d
%o PRP 10^(n+1)+k,t
%o IF ISPRP THEN GOTO e
%o GOTO b
%o LABEL e
%o PRP 10^(n+1)+k+2,t
%o IF ISPRP THEN GOTO f
%o GOTO b
%o LABEL f
%o WRITE myf,t
%o SET k,k+2
%o GOTO a
%Y Cf. A124001 (10^n+k and 10^n+k+2 are prime).
%K nonn
%O 1,2
%A _Pierre CAMI_, Jul 22 2013
|