A191671 Dispersion of A004772 (>1 and congruent to 0 or 2 or 3 mod 4), by antidiagonals.
1, 2, 5, 3, 7, 9, 4, 10, 12, 13, 6, 14, 16, 18, 17, 8, 19, 22, 24, 23, 21, 11, 26, 30, 32, 31, 28, 25, 15, 35, 40, 43, 42, 38, 34, 29, 20, 47, 54, 58, 56, 51, 46, 39, 33, 27, 63, 72, 78, 75, 68, 62, 52, 44, 37, 36, 84, 96, 104, 100, 91, 83, 70, 59, 50, 41
Offset: 1
Examples
Northwest corner: 1....2....3....4....6 5....7....10...14...19 9....12...16...22...30 13...18...24...32...43 17...23...31...42...56
Links
- Ivan Neretin, Table of n, a(n) for n = 1..5050 (first 100 antidiagonals, flattened)
Programs
-
Mathematica
(* Program generates the dispersion array T of the increasing sequence f[n] *) r = 40; r1 = 12; c = 40; c1 = 12; a = 2; b = 3; c2 = 4; m[n_] := If[Mod[n, 3] == 0, 1, 0]; f[n_] := a*m[n + 2] + b*m[n + 1] + c2*m[n] + 4*Floor[(n - 1)/3] Table[f[n], {n, 1, 30}] (* A004772 *) mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]] rows = {NestList[f, 1, c]}; Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}]; t[i_, j_] := rows[[i, j]]; TableForm[Table[t[i, j], {i, 1, 10}, {j, 1, 10}]] (* A191671 *) Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A191671 *)
Comments