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.

A194038 Natural interspersion of A034856, a rectangular array, by antidiagonals.

Original entry on oeis.org

1, 4, 2, 8, 5, 3, 13, 9, 6, 7, 19, 14, 10, 11, 12, 26, 20, 15, 16, 17, 18, 34, 27, 21, 22, 23, 24, 25, 43, 35, 28, 29, 30, 31, 32, 33, 53, 44, 36, 37, 38, 39, 40, 41, 42, 64, 54, 45, 46, 47, 48, 49, 50, 51, 52, 76, 65, 55, 56, 57, 58, 59, 60, 61, 62, 63, 89, 77, 66
Offset: 0

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, A194038 is a permutation of the positive integers; its inverse is A194040.

Examples

			Northwest corner:
1...4...8...13...19
2...5...9...14...20
3...6...10..15...21
7...11..16..22...29
12..17..23..30...38
		

Crossrefs

Programs

  • Mathematica
    z = 30;
    c[k_] := (k^2 + 3 k - 2)/2;
    c = Table[c[k], {k, 1, z}]  (* A034856 *)
    f[n_] := If[MemberQ[c, n], 1, 1 + f[n - 1]]
    f = Table[f[n], {n, 1, 255}]  (* essentially A002260 *)
    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}]]   (* A194038 *)
    q[n_] := Position[p, n]; Flatten[Table[q[n], {n, 1, 70}]]  (* A194040 *)