login
Sequence of pairs k>0 and j>1 with the smallest j and the smallest sum j+k such that (k*j^n-1)*k*j^n-1 is prime.
2

%I #19 Oct 22 2013 13:24:55

%S 2,2,1,2,2,2,1,2,1,2,1,3,1,3,2,2,1,2,1,2,8,3,5,3,3,4,1,7,1,5,4,2,2,2,

%T 1,2,1,4,1,3,7,3,2,4,5,4,1,5,2,3,3,2,2,6,2,4,1,15,1,11,10,2,5,2,3,7,3,

%U 3,1,3,1,3,2,2,1,2,17,2,5,4,7,3,5,4,4,2,2,2,1,2,5,2,8,2,4,2,2,2,1,2,8,7,5,7,4,4,1,4,4,2,2,2,1,2,17,5,14,7,2,7,3,14,6,6,1,6,3,10,3,4,3,23,3,7,12,4,3,4

%N Sequence of pairs k>0 and j>1 with the smallest j and the smallest sum j+k such that (k*j^n-1)*k*j^n-1 is prime.

%H Pierre CAMI, <a href="/A230259/b230259.txt">Table of n, a(n) for n = 1..4000</a>

%e Sequence starts with 2,2 as (2*2^1-1)*2*2^1-1=11 is prime and (1*2^1-1)*1*2^1-1 is unity.

%e (1*2^2-1)*1*2^2-1=11 prime so the second pair is 1,2.

%o PFGW & SCRIPTIFY

%o SCRIPT

%o DIM n,0

%o DIM j

%o DIM k

%o DIM ss

%o DIMS tt

%o OPENFILEOUT myf,a(n).txt

%o LABEL a

%o SET n,n+1

%o IF n>2000 THEN END

%o SET ss,2

%o LABEL b

%o SET ss,ss+1

%o SET j,1

%o LABEL c

%o SET j,j+1

%o SET k,ss-j

%o IF k<1 THEN GOTO b

%o SETS tt,%d,%d,%d\,;n;k;j

%o PRP (k*j^n-1)*k*j^n-1,tt

%o IF ISPRP THEN GOTO d

%o GOTO c

%o LABEL d

%o WRITE myf,tt

%o GOTO a

%Y Cf. A156051, A227903.

%K nonn

%O 1,1

%A _Pierre CAMI_, Oct 14 2013