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.

A212488 Smallest k>0 such that (5^n-k)*5^n-1 and (5^n-k)*5^n+1 are a twin prime pair or 0 if no such k exists.

This page as a plain text file.
%I A212488 #15 Dec 17 2023 13:45:41
%S A212488 0,1,11,1,17,85,17,25,71,25,83,673,3623,1069,401,1225,1361,409,3449,
%T A212488 2581,779,613,605,781,395,5797,17,6967,755,361,3443,5467,6857,679,53,
%U A212488 9355,3287,2941,22385,6091,8423,685,13649,2437,113,19393,19781,12253,53603,21049,5321,2149,21779
%N A212488 Smallest k>0 such that (5^n-k)*5^n-1 and (5^n-k)*5^n+1 are a twin prime pair or 0 if no such k exists.
%C A212488 Conjecture: There is always one such k if n>1.
%H A212488 Pierre CAMI, <a href="/A212488/b212488.txt">Table of n, a(n) for n = 1..501</a>
%t A212488 sktp[n_]:=Module[{k=1,c=5^n},While[AnyTrue[c(c-k)+{1,-1},CompositeQ],k++];k]; Join[{0},Array[ sktp,60,2]] (* _Harvey P. Dale_, Dec 17 2023 *)
%o A212488 (PFGW64 and SCRIPTIFY)
%o A212488 SCRIPT
%o A212488 DIM nn, 1
%o A212488 DIM kk
%o A212488 DIM jj
%o A212488 DIMS tt
%o A212488 OPENFILEOUT myfile, a(n).txt
%o A212488 OPENFILEOUT myf, b(n).txt
%o A212488 LABEL loopn
%o A212488 SET nn, nn+1
%o A212488 SET jj, 0
%o A212488 IF nn>500 THEN END
%o A212488 SET kk, -1
%o A212488 LABEL loopk
%o A212488 SET kk, kk+2
%o A212488 SETS tt, %d, %d\,; nn; kk
%o A212488 PRP (5^nn-kk)*5^nn-1, tt
%o A212488 IF ISPRP THEN GOTO a
%o A212488 IF ISPRIME THEN GOTO a
%o A212488 GOTO loopk
%o A212488 LABEL a
%o A212488 SET jj, jj+1
%o A212488 PRP (5^nn-kk)*5^nn+1, tt
%o A212488 IF ISPRP THEN GOTO d
%o A212488 IF ISPRIME THEN GOTO d
%o A212488 GOTO loopk
%o A212488 LABEL d
%o A212488 WRITE myfile, tt
%o A212488 SETS tt, %d, %d\,; nn; jj
%o A212488 WRITE myf, tt
%o A212488 GOTO loopn
%Y A212488 Cf. A212487
%K A212488 nonn
%O A212488 1,3
%A A212488 _Pierre CAMI_, Jul 18 2012