login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A082189
Main diagonal of square array A082025.
5
1, 5, 12, 41, 26, 103, 58, 181, 92, 293, 128, 439, 174, 617, 230, 817, 290, 1037, 376, 1225, 446, 1565, 542, 1883, 628, 2227, 746, 2555, 848, 2983, 962, 3409, 1102, 3859, 1238, 4331, 1384, 4823, 1532, 5345, 1684, 5945, 1858, 6539, 2038, 7135, 2218, 7801
OFFSET
1,2
LINKS
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