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.

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.

This page as a plain text file.
%I A224905 #11 May 09 2020 13:49:56
%S A224905 1,49,91,1117,2929,721,1819,37237,30979,30967,29629,6457,53269,27727,
%T A224905 271159,556651,190489,62797,105259,784777,290659,1320829,438037,
%U A224905 1019317,333991,248371,226609,671227,384571,1573537,366841,954391,1701247,540811,1105291
%N 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.
%H A224905 Pierre CAMI, <a href="/A224905/b224905.txt">Table of n, a(n) for n = 1..76</a>
%e A224905 10^1+1=11 prime as 13 10^2+1=101 prime as 103 so a(1)=1.
%t A224905 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 A224905 PFGW & SCRIPTIFY
%o A224905 SCRIPT
%o A224905 DIM n, 0
%o A224905 DIM k, -1
%o A224905 DIMS t
%o A224905 OPENFILEOUT myf, a(n).txt
%o A224905 LABEL a
%o A224905 SET n, n+1
%o A224905 SET k,-1
%o A224905 LABEL b
%o A224905 SET k, k+2
%o A224905 SETS t, %d, %d\,; n; k
%o A224905 PRP 10^n+k, t
%o A224905 IF ISPRP THEN GOTO c
%o A224905 GOTO b
%o A224905 LABEL c
%o A224905 PRP 10^n+k+2, t
%o A224905 IF ISPRP THEN GOTO d
%o A224905 GOTO b
%o A224905 LABEL d
%o A224905 PRP 10^(n+1)+k, t
%o A224905 IF ISPRP THEN GOTO e
%o A224905 GOTO b
%o A224905 LABEL e
%o A224905 PRP 10^(n+1)+k+2, t
%o A224905 IF ISPRP THEN GOTO f
%o A224905 GOTO b
%o A224905 LABEL f
%o A224905 WRITE myf, t
%o A224905 SET k, k+2
%o A224905 GOTO a
%Y A224905 Cf. A124001, A224846.
%K A224905 nonn
%O A224905 1,2
%A A224905 _Pierre CAMI_, Jul 25 2013