login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A224905 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. 1

%I #11 May 09 2020 13:49:56

%S 1,49,91,1117,2929,721,1819,37237,30979,30967,29629,6457,53269,27727,

%T 271159,556651,190489,62797,105259,784777,290659,1320829,438037,

%U 1019317,333991,248371,226609,671227,384571,1573537,366841,954391,1701247,540811,1105291

%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.

%H Pierre CAMI, <a href="/A224905/b224905.txt">Table of n, a(n) for n = 1..76</a>

%e 10^1+1=11 prime as 13 10^2+1=101 prime as 103 so a(1)=1.

%t sk[n_]:=Module[{k=1},While[!AllTrue[{10^n+k,10^n+k+2,10^(n+1)+k,10^(n+1)+k+2},PrimeQ],k++];k]; Array[sk,35] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, May 09 2020 *)

%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 SET k,-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, A224846.

%K nonn

%O 1,2

%A _Pierre CAMI_, Jul 25 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)