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.

Showing 1-2 of 2 results.

A297769 Rectangular array read by antidiagonals: row n gives the numbers whose base-2 digits d(m), d(m-1), ..., d(0) have maximal run-length n.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 10, 6, 8, 15, 21, 9, 14, 16, 31, 42, 11, 17, 30, 32, 63, 85, 12, 23, 33, 62, 64, 127, 170, 13, 24, 47, 65, 126, 128, 255, 341, 18, 28, 48, 95, 129, 254, 256, 511, 682, 19, 29, 60, 96, 191, 257, 510, 512, 1023, 1365, 20, 34, 61, 124, 192
Offset: 1

Views

Author

Clark Kimberling, Apr 10 2018

Keywords

Comments

Every positive integer occurs exactly once, so that as a sequence, this is a permutation of the positive integers.

Examples

			Northwest corner:
   1    2    5    10    21    42     85
   3    4    6     9    11    12     13
   7    8   14    17    23    24     28
  15   16   30    33    47    48     60
  31   32   62    65    95    96    124
  63   64  126   129   191   192    252
***
Base-2 digits of 23: 1,0,1,1,1, with run 1,1,1, of maximal length 3, so that 23 is in row 3.
		

Crossrefs

Programs

  • Mathematica
    b = 2; u[n_] := Max[Map[Length, Split[IntegerDigits[n, b]]]];
    z = 4096; r[n_] := Select[Range[z], u[#] == n &]
    TableForm[Table[r[n], {n, 1, 12}]]  (* A297769, array *)
    v[n_, k_] := r[k][[n]];
    Table[v[k, n - k + 1], {n, 11}, {k, n, 1, -1}] // Flatten (* A297769, sequence *)

A297933 Rectangular array, by antidiagonals: Row n gives the numbers whose base-2 digits d(m), d(m-1), ..., d(0) having n as maximal run-length of 1's.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 5, 11, 14, 15, 8, 12, 23, 30, 31, 9, 13, 28, 47, 62, 63, 10, 19, 29, 60, 95, 126, 127, 16, 22, 39, 61, 124, 191, 254, 255, 17, 24, 46, 79, 125, 252, 383, 510, 511, 18, 25, 55, 94, 159, 253, 508, 767, 1022, 1023, 20, 26, 56, 111, 190, 319
Offset: 1

Views

Author

Clark Kimberling, Jan 26 2018

Keywords

Comments

Every positive integer occurs exactly once, so that as a sequence, this is a permutation of the positive integers.

Examples

			Northwest corner:
  1      2     4     5     8     9    10    16
  3      6    11    12    13    19    22    24
  7     14    23    28    29    39    46    55
  15    30    47    60    61    79    94   111
  31    62    95   124   125   159   190   223
  63   126   191   252   253   319   382   447
  127  254   383   508   509   639   766   895
***
Base-2 digits of 59: 1,1,1,0,1,1 with runs 111 and 11 of 1's, so that 59 is in row 3.
		

Crossrefs

Programs

  • Mathematica
    b = 2; s[n_] := Split[IntegerDigits[n, b]];
    m[n_, d_] := Union[Select[s[n], MemberQ[#, d] &]]
    h[n_, d_] := Max[Map[Length, m[n, d]]]
    z = 6000; w = t[d_] := Table[h[n, d], {n, 1, z}] /. -Infinity -> 0
    TableForm[Table[Flatten[Position[t[1], d]], {d, 0, 8}]]  (* A297933 array *)
    u[d_] := Flatten[Position[t[1], d]]
    v[d_, n_] := u[d][[n]];
    Table[v[n, k - n + 1], {k, 1, 11}, {n, 1, k}] // Flatten (* A297933 sequence *)
Showing 1-2 of 2 results.