login
A082196
Triangle read by rows in which the n-th row contains n distinct numbers (not occurring earlier) such that every entry is coprime to its neighbor in all directions.
5
1, 2, 3, 5, 7, 4, 6, 11, 9, 13, 17, 19, 8, 23, 10, 12, 25, 21, 29, 27, 31, 37, 41, 16, 43, 14, 47, 15, 18, 35, 33, 53, 39, 59, 22, 49, 61, 67, 26, 71, 20, 73, 45, 79, 24, 28, 51, 55, 57, 77, 83, 32, 89, 65, 97, 95, 101, 46, 103, 34, 69, 85, 63, 38, 81, 40, 36, 91, 75, 107, 109, 113, 44, 127, 115, 119, 121, 87
OFFSET
1,2
LINKS
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