Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Numbers k such that d(r,k) = 0 and d(s,k) = 1, where d(x,k) = k-th binary digit of x, r = {sqrt(2)}, s = {sqrt(3)}, and { } = fractional part.
4

%I #13 Sep 26 2014 17:23:40

%S 1,4,8,10,11,14,15,21,25,38,42,47,51,54,55,59,60,63,64,70,72,78,83,85,

%T 86,92,100,107,109,119,121,128,134,136,147,148,150,153,157,162,168,

%U 169,173,182,183,184,198,200,209,211,214,215,218,226,227,229,241

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

%C Every positive integer lies in exactly one of these: A246356, A246357, A246358, A247356.

%H Clark Kimberling, <a href="/A246357/b246357.txt">Table of n, a(n) for n = 1..1000</a>

%e {sqrt(2)} has binary digits 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1,...

%e {sqrt(3)} has binary digits 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0,..

%e so that a(1) = 1 and a(2) = 4.

%t z = 500; r = FractionalPart[Sqrt[2]]; s = FractionalPart[Sqrt[3]];

%t u = Flatten[{ConstantArray[0, -#[[2]]], #[[1]]}] &[RealDigits[r, 2, z]]

%t v = Flatten[{ConstantArray[0, -#[[2]]], #[[1]]}] &[RealDigits[s, 2, z]]

%t t1 = Table[If[u[[n]] == 0 && v[[n]] == 0, 1, 0], {n, 1, z}];

%t t2 = Table[If[u[[n]] == 0 && v[[n]] == 1, 1, 0], {n, 1, z}];

%t t3 = Table[If[u[[n]] == 1 && v[[n]] == 0, 1, 0], {n, 1, z}];

%t t4 = Table[If[u[[n]] == 1 && v[[n]] == 1, 1, 0], {n, 1, z}];

%t Flatten[Position[t1, 1]] (* A246356 *)

%t Flatten[Position[t2, 1]] (* A246357 *)

%t Flatten[Position[t3, 1]] (* A246358 *)

%t Flatten[Position[t4, 1]] (* A247356 *)

%Y Cf. A247454, A246356, A246358, A247356.

%K nonn,easy,base

%O 1,2

%A _Clark Kimberling_, Sep 17 2014