Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #15 Dec 17 2023 13:45:41
%S 0,1,11,1,17,85,17,25,71,25,83,673,3623,1069,401,1225,1361,409,3449,
%T 2581,779,613,605,781,395,5797,17,6967,755,361,3443,5467,6857,679,53,
%U 9355,3287,2941,22385,6091,8423,685,13649,2437,113,19393,19781,12253,53603,21049,5321,2149,21779
%N 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 Conjecture: There is always one such k if n>1.
%H Pierre CAMI, <a href="/A212488/b212488.txt">Table of n, a(n) for n = 1..501</a>
%t 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 (PFGW64 and SCRIPTIFY)
%o SCRIPT
%o DIM nn, 1
%o DIM kk
%o DIM jj
%o DIMS tt
%o OPENFILEOUT myfile, a(n).txt
%o OPENFILEOUT myf, b(n).txt
%o LABEL loopn
%o SET nn, nn+1
%o SET jj, 0
%o IF nn>500 THEN END
%o SET kk, -1
%o LABEL loopk
%o SET kk, kk+2
%o SETS tt, %d, %d\,; nn; kk
%o PRP (5^nn-kk)*5^nn-1, tt
%o IF ISPRP THEN GOTO a
%o IF ISPRIME THEN GOTO a
%o GOTO loopk
%o LABEL a
%o SET jj, jj+1
%o PRP (5^nn-kk)*5^nn+1, tt
%o IF ISPRP THEN GOTO d
%o IF ISPRIME THEN GOTO d
%o GOTO loopk
%o LABEL d
%o WRITE myfile, tt
%o SETS tt, %d, %d\,; nn; jj
%o WRITE myf, tt
%o GOTO loopn
%Y Cf. A212487
%K nonn
%O 1,3
%A _Pierre CAMI_, Jul 18 2012