login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A247457 Numbers k such that d(r,k) = 1 and d(s,k) = 0, where d(x,k) = k-th binary digit of x, r = {sqrt(2)}, s = {3*sqrt(2)}, and { } = fractional part. 4

%I #14 Sep 28 2014 09:11:13

%S 2,18,22,26,35,41,45,49,65,67,71,77,79,88,90,95,98,108,110,112,117,

%T 126,133,135,138,143,145,152,155,172,175,188,194,196,203,208,210,212,

%U 221,223,230,234,239,243,260,262,268,278,292,294,296,299,310,312,319

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

%C Every positive integer lies in exactly one of these: A247455, A247456, A247457, A247458.

%H Clark Kimberling, <a href="/A247457/b247457.txt">Table of n, a(n) for n = 1..500</a>

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

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

%e so that a(1) = 2.

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

%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]] (* A247455 *)

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

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

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

%Y Cf. A247455, A247456, A247458.

%K nonn,easy,base

%O 1,1

%A _Clark Kimberling_, Sep 18 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 05:49 EDT 2024. Contains 371918 sequences. (Running on oeis4.)