%I #17 Aug 16 2013 11:48:15
%S 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,26,26,
%T 27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,46,47,48,49,
%U 50,51,52,53,55,55,56,57,59,59,60,61,62,63,64,66,66,67,68,70
%N Smallest k > n such that j*10^k + m*10^n - 1 is a prime number for at least a pair {j,m} with 0 < j < 10 and 0 < m < 10.
%C The prime numbers are the sum of a near repdigit number starting with the digit j followed by k digits 0 and a nearepdigit number starting with the digit (m-1) followed by n digits 9 for m>1, or for m=1 a repdigit number with n digits 9.
%C The first primes are :
%C 109, 1399, 13999, 139999, 1199999, 16999999, 289999999, 2099999999, 10999999999, 239999999999, 1099999999999, 34999999999999, 349999999999999, 2399999999999999.
%C Conjecture: there is always at least one k for each n.
%H Pierre CAMI, <a href="/A228144/b228144.txt">Table of n, a(n) for n = 1..4000</a>
%e 1*10^1+1*10^2=109 prime so a(1)=2.
%o PFGW & SCRIPTIFY
%o SCRIPT
%o DIM k
%o DIM j
%o DIM m
%o DIM n, 0
%o DIMS t
%o OPENFILEOUT myf, a(n, 3).txt
%o LABEL a
%o SET n, n+1
%o IF n>4000 THEN END
%o SET j, n
%o LABEL b
%o SET j, j+1
%o SET k, 0
%o LABEL c
%o SET k, k+1
%o IF k>9 THEN GOTO b
%o SET m, 0
%o LABEL d
%o SET m, m+1
%o IF m>9 THEN GOTO c
%o IF 4*(k+m)%3==1 THEN GOTO d
%o SETS t, %d, %d, %d, %d\,; n; k; j; m
%o PRP m*10^n+j*10^k-1, t
%o IF ISPRP THEN GOTO e
%o GOTO d
%o LABEL e
%o WRITE myf, t
%o GOTO a
%Y Cf. A213790, A213883.
%K nonn
%O 1,1
%A _Pierre CAMI_, Aug 14 2013
|