OFFSET
1,1
LINKS
EXAMPLE
Square array A(n,k) begins:
: 11, 2, 3, 41, 5, 61, 7, 83, ...
: 13, 23, 31, 43, 53, 67, 71, 89, ...
: 17, 29, 37, 47, 59, 601, 73, 809, ...
: 19, 211, 307, 401, 503, 607, 79, 811, ...
: 101, 223, 311, 409, 509, 613, 701, 821, ...
: 103, 227, 313, 419, 521, 617, 709, 823, ...
: 107, 229, 317, 421, 523, 619, 719, 827, ...
: 109, 233, 331, 431, 541, 631, 727, 829, ...
MAPLE
u:= (h, t)-> select(isprime, [seq(h*10^t+k, k=0..10^t-1)]):
A:= proc(n, k) local l, p;
l:= proc() [] end; p:= proc() -1 end;
while nops(l(k))<n do p(k):= p(k)+1;
l(k):= [l(k)[], u(k, p(k))[]]
od: l(k)[n]
end:
seq(seq(A(n, 1+d-n), n=1..d), d=1..12);
MATHEMATICA
u[h_, t_] := Select[Table[h*10^t + k, {k, 0, 10^t - 1}], PrimeQ];
A[n_, k_] := Module[{l, p}, l[_] = {}; p[_] = -1; While[Length[l[k]] < n, p[k] = p[k]+1; l[k] = Join[l[k], u[k, p[k]]]]; l[k][[n]]];
Table[Table[A[n, 1+d-n], {n, 1, d}], {d, 1, 12}] // Flatten (* Jean-François Alcover, Dec 06 2019, from Maple *)
CROSSREFS
AUTHOR
Alois P. Heinz, Sep 20 2015
STATUS
approved