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-3 of 3 results.

A293725 Numbers k such that c(k,0) = c(k,1), where c(k,d) = number of d's in the first k digits of the base-2 expansion of sqrt(2).

Original entry on oeis.org

2, 10, 20, 24, 28, 32, 318, 328, 330, 334, 336, 608, 622, 636, 638, 674, 676, 678, 680, 682, 826, 828, 832, 836, 838, 842, 844, 846, 848, 850, 852, 856, 858, 876, 880, 884, 886, 898, 906, 908, 918, 920, 928, 930, 942, 944, 946, 948, 950, 962, 964, 966, 968
Offset: 1

Views

Author

Clark Kimberling, Oct 16 2017

Keywords

Comments

This sequence together with A293727 and A293728 partition the positive integers.

Examples

			In base 2, sqrt(2) = 1.0110101000001001111001..., so that initial segments 1.0; 1.011010100..., of lengths 2,10,... have the same number of 0's and 1's.
		

Crossrefs

Programs

  • Mathematica
    z = 300; u = N[Sqrt[2], z]; d = RealDigits[u, 2][[1]];
    t[n_] := Take[d, n]; c[0, n_] := Count[t[n], 0]; c[1, n_] := Count[t[n], 1];
    Table[{n, c[0, n], c[1, n]}, {n, 1, 100}]
    u = Select[-1 + Range[z], c[0, #] == c[1, #] &]  (* A293725 *)
    u/2  (* A293726 *)
    Select[-1 + Range[z], c[0, #] < c[1, #] &]  (* A293727 *)
    Select[-1 + Range[z], c[0, #] > c[1, #] &]  (* A293728 *)

A293726 a(n) = (1/2)*A293725(n).

Original entry on oeis.org

1, 5, 10, 12, 14, 16, 159, 164, 165, 167, 168, 304, 311, 318, 319, 337, 338, 339, 340, 341, 413, 414, 416, 418, 419, 421, 422, 423, 424, 425, 426, 428, 429, 438, 440, 442, 443, 449, 453, 454, 459, 460, 464, 465, 471, 472, 473, 474, 475, 481, 482, 483, 484
Offset: 1

Views

Author

Clark Kimberling, Oct 18 2017

Keywords

Crossrefs

Programs

  • Mathematica
    z = 300; u = N[Sqrt[2], z]; d = RealDigits[u, 2][[1]];
    t[n_] := Take[d, n]; c[0, n_] := Count[t[n], 0]; c[1, n_] := Count[t[n], 1];
    Table[{n, c[0, n], c[1, n]}, {n, 1, 100}]
    u = Select[Range[z], c[0, #] == c[1, #] &]  (* A293725 *)
    u/2  (* A293726 *)
    Select[Range[z], c[0, #] < c[1, #] &]  (* A293727 *)
    Select[Range[z], c[0, #] > c[1, #] &]  (* A293728 *)

A293727 Numbers k such that c(k,0) < c(k,1), where c(k,d) = number of d's in the first k digits of the base-2 expansion of sqrt(2).

Original entry on oeis.org

1, 3, 4, 5, 6, 7, 8, 9, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91
Offset: 1

Views

Author

Clark Kimberling, Oct 18 2017

Keywords

Comments

This sequence together with A293725 and A293728 partition the nonnegative integers.

Crossrefs

Programs

  • Mathematica
    z = 300; u = N[Sqrt[2], z]; d = RealDigits[u, 2][[1]];
    t[n_] := Take[d, n]; c[0, n_] := Count[t[n], 0]; c[1, n_] := Count[t[n], 1];
    Table[{n, c[0, n], c[1, n]}, {n, 1, 100}]
    u = Select[Range[z], c[0, #] == c[1, #] &]  (* A293725 *)
    u/2  (* A293726 *)
    Select[Range[z], c[0, #] < c[1, #] &]  (* A293727 *)
    Select[Range[z], c[0, #] > c[1, #] &]  (* A293728 *)
Showing 1-3 of 3 results.