OFFSET
1,1
LINKS
EXAMPLE
Square array A(n,k) begins:
: 2, 2, 3, 17, 5, 13, 7, 17, ...
: 3, 5, 7, 19, 11, 53, 29, 67, ...
: 5, 11, 13, 37, 23, 97, 31, 71, ...
: 7, 17, 29, 67, 41, 101, 59, 131, ...
: 11, 19, 31, 71, 43, 103, 61, 137, ...
: 13, 23, 53, 73, 47, 107, 113, 139, ...
: 17, 37, 59, 79, 83, 109, 127, 257, ...
: 19, 41, 61, 131, 89, 193, 227, 263, ...
MAPLE
u:= (h, t)-> select(isprime, [seq(h*2^t+k, k=0..2^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..14);
MATHEMATICA
nmax = 14;
col[k_] := col[k] = Module[{bk = IntegerDigits[k, 2], lk, pp = {}, coe = 1}, lbk = Length[bk]; While[Length[pp] < nmax, pp = Select[Prime[Range[ coe*nmax]], Quiet@Take[IntegerDigits[#, 2], lbk] == bk&]; coe++]; pp];
A[n_, k_] := col[k][[n]];
Table[A[n-k+1, k], {n, 1, nmax}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Oct 25 2021 *)
CROSSREFS
AUTHOR
Alois P. Heinz, Sep 20 2015
STATUS
approved