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.

A247454 Numbers k such that d(r,k) = d(s,k), where d(x,k) = k-th binary digit of x, r = {sqrt(2)}, s = {sqrt(3)}, and { } = fractional part.

Original entry on oeis.org

3, 5, 6, 7, 9, 12, 16, 17, 19, 20, 22, 23, 24, 28, 29, 30, 32, 33, 37, 41, 45, 48, 49, 52, 56, 57, 58, 61, 62, 66, 67, 69, 74, 75, 76, 81, 82, 88, 89, 90, 91, 93, 96, 98, 99, 101, 102, 104, 105, 106, 108, 111, 113, 115, 116, 117, 120, 122, 125, 129, 130, 131
Offset: 1

Views

Author

Clark Kimberling, Sep 17 2014

Keywords

Comments

Every positive integer lies in exactly one of the sequences A247454 and A247324. Let s denote either sequence; is lim(#s < n)/n = 1/2, where (#s < n) represents the number of numbers in s that are < n?

Examples

			{sqrt(2)} has binary digits 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1,...
{sqrt(3)} has binary digits 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0,..
so that a(1) = 3 and a(2) = 5.
		

Crossrefs

Programs

  • Mathematica
    z = 200; r = FractionalPart[Sqrt[2]]; s = FractionalPart[Sqrt[3]];
    u = Flatten[{ConstantArray[0, -#[[2]]], #[[1]]}] &[RealDigits[r, 2, z]];
    v = Flatten[{ConstantArray[0, -#[[2]]], #[[1]]}] &[RealDigits[s, 2, z]];
    t = Table[If[u[[n]] == v[[n]], 1, 0], {n, 1, z}];
    Flatten[Position[t, 1]]  (* A247454 *)
    Flatten[Position[t, 0]]  (* A247324 *)