OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..100
MAPLE
b:= proc(t) false end: b(1):= true: ncpr:= proc() local i, m; m:= args[1]; for i from 2 to nargs do if igcd (m, args[i])<>1 then return true fi od; false end: T:= proc(n, k) option remember; local h, t, l; if n<1 or k<1 or n=1 and k=1 then t:=1 else h:= 1- 2* irem(n+k, 2); l:= T(n-1, k), T(n, k-1), T(n-1, k-1), T(n+h, k-h); for t while b(t) or ncpr(t, l) do od fi; b(t):= true; t end: seq (T(n, n), n=1..40); # Alois P. Heinz, Oct 07 2009
MATHEMATICA
b[_] = False; b[1] = True;
ncpr[args_] := Module[{i, m}, m = args[[1]]; For[i = 2, i <= Length[args], i++, If[GCD[m, args[[i]]] != 1, Return[True]]]];
T[n_, k_] := T[n, k] = Module[{h, t, l}, If[n < 1 || k < 1 || n == 1 && k == 1, t = 1, h = 1 - 2*Mod[n + k, 2]; l = {T[n - 1, k], T[n, k - 1], T[n - 1, k - 1], T[n + h, k - h]}; For[t = 1, b[t] || ncpr[Join[{t}, l]], t++]; b[t] = True; t]];
Table [T[n, n], {n, 1, 40}] (* Jean-François Alcover, Jun 03 2018, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Apr 07 2003
EXTENSIONS
Edited and more terms from Alois P. Heinz, Oct 07 2009
STATUS
approved