cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A194036 Natural interspersion of A028872, a rectangular array, by antidiagonals.

Original entry on oeis.org

1, 6, 2, 13, 7, 3, 22, 14, 8, 4, 33, 23, 15, 9, 5, 46, 34, 24, 16, 10, 11, 61, 47, 35, 25, 17, 18, 12, 78, 62, 48, 36, 26, 27, 19, 20, 97, 79, 63, 49, 37, 38, 28, 29, 21, 118, 98, 80, 64, 50, 51, 39, 40, 30, 31, 141, 119, 99, 81, 65, 66, 52, 53, 41, 42, 32, 166, 142
Offset: 1

Views

Author

Clark Kimberling, Aug 12 2011

Keywords

Comments

See A194029 for definitions of natural fractal sequence and natural interspersion. Every positive integer occurs exactly once (and every pair of rows intersperse), so that as a sequence, A194036 is a permutation of the positive integers; its inverse is A194037.

Examples

			Northwest corner:
1...6...13...22...33
2...7...14...23...34
3...8...15...24...35
4...9...16...25...36
5...10..17...26...37
11..18..27...38...51
		

Crossrefs

Programs

  • Mathematica
    z = 30;
    c[k_] := k^2 + 2 k - 2;
    c = Table[c[k], {k, 1, z}]  (* A028872 *)
    f[n_] := If[MemberQ[c, n], 1, 1 + f[n - 1]]
    f = Table[f[n], {n, 1, 255}]  (* A071797 *)
    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, 13}, {k, 1, n}]]  (* A194036 *)
    q[n_] := Position[p, n]; Flatten[Table[q[n], {n, 1, 70}]]  (* A194037 *)