login
A247459
Numbers k such that d(r,k) = d(s,k), where d(x,k) = k-th binary digit of x, r = {sqrt(2)}, s = {3*sqrt(2)}, and { } = fractional part.
2
1, 3, 5, 7, 8, 9, 10, 11, 13, 15, 16, 17, 19, 21, 23, 25, 27, 29, 30, 31, 32, 33, 34, 36, 38, 39, 40, 42, 43, 44, 46, 48, 50, 51, 53, 54, 56, 57, 58, 59, 61, 62, 64, 66, 68, 70, 72, 73, 74, 75, 76, 78, 80, 81, 82, 84, 86, 87, 89, 91, 93, 94, 96, 97, 99, 101
OFFSET
1,2
COMMENTS
Every positive integer lies in exactly one of the sequences A247459 and A247460.
LINKS
EXAMPLE
{1*sqrt(2)} has binary digits 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1,...
{3*sqrt(2)} has binary digits 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1,...
so that a(1) = 1 and a(2) = 3.
MATHEMATICA
z = 200; r = FractionalPart[Sqrt[2]]; s = FractionalPart[3*Sqrt[2]];
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]] (* A247459 *)
Flatten[Position[t, 0]] (* A247460 *)
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Clark Kimberling, Sep 18 2014
STATUS
approved