login
A247460
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
2, 4, 6, 12, 14, 18, 20, 22, 24, 26, 28, 35, 37, 41, 45, 47, 49, 52, 55, 60, 63, 65, 67, 69, 71, 77, 79, 83, 85, 88, 90, 92, 95, 98, 100, 102, 104, 106, 108, 110, 112, 117, 119, 121, 126, 129, 133, 135, 138, 143, 145, 150, 152, 155, 157, 159, 163, 166, 168
OFFSET
1,1
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) = 2 and a(2) = 4.
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