A383613 Square array read by antidiagonals upwards: T(n,k) (for n>1 and k>0) is the smallest k-digit prime p such that prevprime(p) appears as a substring in p^n; or -1 if no such prime exists.
-1, 3, -1, -1, 17, -1, 3, 43, 997, 3701, 3, 31, 607, 2837, -1, 3, 11, 929, 5843, 57349, -1, 5, 11, -1, 4447, 31063, 224813, -1, 5, -1, 277, 2477, 77377, 292223, 9999991, 65442077, 7, 11, 809, 7019, 24379, 262433, 9862243, 61879669, -1, -1, 11, 499, 1571, 17669, 342281, 1303613, 32685743, 763137931, -1
Offset: 2
Examples
T(2,4) = 3701, because prevprime(3701) = 3697 is a substring of 3701^2 = 13697401, and no smaller 4-digit prime satisfies this condition. Top left corner begins at T(2,1): -1, -1, -1, 3701, -1, ... 3, 17, 997, 2837, 57349, ... -1, 43, 607, 5843, 31063, ... 3, 31, 929, 4447, 77377, ... . .., ..., ...., ....., ...
Crossrefs
Cf. A381969.
Programs
-
PARI
T(n,k) = forprime(p=10^(k-1), 10^k-1, if (#strsplit(Str(p^n), Str(precprime(p-1))) >= 2, return(p));); return(-1); \\ Michel Marcus, May 02 2025