A376006 Record values in A032662.
2, 4, 12, 21, 929, 938, 9500, 99204, 9990074, 99999981142, 999999998621256, 99999999999999896026031
Offset: 1
Examples
a(5) = 929 because A376002(5) = 84 and A032662(84) = 929. Thus 84 + 929 = 1013, the concatenation 9291013 is prime, the concatenations k || k+84 are composite for 1 <= k < 929, and for every m < 84 there is k < 929 where k || k+m is prime.
Programs
-
Maple
tcat:= (a, b) -> a*10^(1+ilog10(b))+b: f:= proc(n) local k, k0, d; for d from ilog10(n)+1 do if igcd(10^d+1, n) = 1 then k0:= max(1, 10^(d-1)-n); if (k0+n)::even then k0:= k0+1 fi; for k from k0 to 10^d-n-1 by 2 do if isprime(tcat(k, k+n)) then return k fi od fi od end proc: V:= NULL: m:= 0: count:= 0: for i from 1 while count < 11 do v:= f(i); if v > m then count:= count+1; m:= v; V:= V, v; fi; od: V;
Comments