OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..19477
PROG
(PARI)
getrow(n, all) = {if (n==1, return ([1])); if (n==2, return ([3, 2])); my(row = vector(n)); row[1] = prime(n); for (k=2, n, my(ok = 0, m = 1, val); until(ok, val = m*prime(n+1-k); if (!setsearch(all, val) && !setsearch(Set(row), val), ok = 1); m++; ); row[k] = val; ); return (row); };
A026100list(up_to_row) = { my(all = [], m = Map(), lista = List([]), u); for(n=1, up_to_row, my(row = getrow(n, all)); for(k=1, n, mapput(m, row[k], k)); all = Set(concat(all, row))); for(n=1, oo, if(mapisdefined(m, n, &u), listput(lista, u), if(isprime(n)&&(n>2), listput(lista, 1), return(Vec(lista))))); };
v026100 = A026100list(1200);
A026100(n) = v026100[n]; \\ Antti Karttunen, Jan 18 2020, after program in A026098 provided by Michel Marcus.
CROSSREFS
KEYWORD
nonn,look
AUTHOR
EXTENSIONS
a(27) onward corrected by Sean A. Irvine, Sep 15 2019
STATUS
approved