OFFSET
1,2
LINKS
Alois P. Heinz, Rows n = 1..141, flattened
EXAMPLE
Triangle begins
1;
2, 3;
5, 7, 4;
6, 11, 9, 13;
17, 19, 8, 23, 10;
...
a(4,2) = 11. Its 8 neighbors are 5,7,4,9,8,19,17 and 6, which are coprime to 11.
MAPLE
ina:= proc() false end: mina:= 2:
T:= proc(n, k) option remember; global mina; local t;
if n<2 or k<1 or k>n then 1
else for t from mina while ina(t) or [1$4] <> map (x->igcd(x, t),
[T(n-1, k-1), T(n-1, k), T(n-1, k+1), T(n, k-1)])
do od; ina(t):= true;
while ina(mina) do mina:= mina+1 od;
t
fi
end:
seq (seq (T(n, k), k=1..n), n=1..15); # Alois P. Heinz, Sep 10 2011
MATHEMATICA
ina[_] = False; mina = 2; T[n_, k_] := T[n, k] = If[n<2 || k<1 || k>n, 1, For[t = mina, ina[t] || Array[1&, 4] != Map [GCD[#, t]&, List[T[n-1, k-1], T[n-1, k], T[n-1, k+1], T[n, k-1]]], t++]; ina[t] = True; While[ina[mina], mina = mina+1]; t]; Table[Table[T[n, k], {k, 1, n}], {n, 1, 15}] // Flatten (* Jean-François Alcover, Mar 09 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Amarnath Murthy, Apr 07 2003
EXTENSIONS
More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 20 2003
STATUS
approved