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.

A194061 Natural interspersion of A002620; a rectangular array, by antidiagonals.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 6, 7, 11, 15, 9, 10, 14, 19, 24, 12, 13, 18, 23, 29, 35, 16, 17, 22, 28, 34, 41, 48, 20, 21, 27, 33, 40, 47, 55, 63, 25, 26, 32, 39, 46, 54, 62, 71, 80, 30, 31, 38, 45, 53, 61, 70, 79, 89, 99, 36, 37, 44, 52, 60, 69, 78, 88, 98, 109, 120
Offset: 1

Views

Author

Clark Kimberling, Aug 14 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, A194061 is a permutation of the positive integers; its inverse is A194062.

Examples

			Northwest corner:
1...2...4...6...9...12
3...5...7...10..13..17
8...11..14..18..22..27
15..19..23..28..33..39
24..29..34..40..46..53
		

Crossrefs

Programs

  • Mathematica
    z = 50;
    c[k_] := Floor[((k + 1)^2)/4];
    c = Table[c[k], {k, 1, z}]  (* A002620 *)
    f[n_] := If[MemberQ[c, n], 1, 1 + f[n - 1]]
    f = Table[f[n], {n, 1, 400}]   (* [A122197] *)
    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, 11}, {k, 1, n}]] (* A194061 *)
    q[n_] := Position[p, n]; Flatten[
     Table[q[n], {n, 1, 90}]]  (* A194062 *)