|
|
A247324
|
|
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.
|
|
2
|
|
|
1, 2, 4, 8, 10, 11, 13, 14, 15, 18, 21, 25, 26, 27, 31, 34, 35, 36, 38, 39, 40, 42, 43, 44, 46, 47, 50, 51, 53, 54, 55, 59, 60, 63, 64, 65, 68, 70, 71, 72, 73, 77, 78, 79, 80, 83, 84, 85, 86, 87, 92, 94, 95, 97, 100, 103, 107, 109, 110, 112, 114, 118, 119
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Every positive integer lies in exactly one of the sequences A247454 and A247324.
|
|
LINKS
|
|
|
EXAMPLE
|
{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) = 1 and a(2) = 2.
|
|
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 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|