OFFSET
1,2
COMMENTS
EXAMPLE
Northwest corner:
1...5...14...30...55
2...6...15...31...56
3...7...16...32...57
4...8...17...33...58
9...18..34...59...95
MATHEMATICA
Remove["Global`*"];
z = 30;
c[k_] := k (k + 1) (2 k + 1)/6;
c = Table[c[k], {k, 1, z}] (* A000330 *)
f[n_] := If[MemberQ[c, n], 1, 1 + f[n - 1]]
f = Table[f[n], {n, 1, 500}] (* fractal sequence [A064866] *)
r[n_] := Flatten[Position[f, n]]
t[n_, k_] := r[n][[k]]
TableForm[Table[t[n, k], {n, 1, 7}, {k, 1, 7}]]
p = Flatten[Table[t[k, n - k + 1], {n, 1, 10}, {k, 1, n}]] (* A194048 *)
q[n_] := Position[p, n]; Flatten[Table[q[n], {n, 1, 70}]] (* A194049 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Clark Kimberling, Aug 13 2011
STATUS
approved