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!)
A086483 Bit that is two places to left of least significant 1-bit in the binary expansion of n. 2

%I #17 Apr 03 2024 15:16:59

%S 0,0,0,0,0,1,0,1,0,0,1,0,0,1,1,1,0,0,0,0,1,1,0,1,0,0,1,0,1,1,1,1,0,0,

%T 0,0,0,1,0,1,1,0,1,0,0,1,1,1,0,0,0,0,1,1,0,1,1,0,1,0,1,1,1,1,0,0,0,0,

%U 0,1,0,1,0,0,1,0,0,1,1,1,1,0,0,0,1,1,0,1,0,0,1,0,1,1,1,1,0,0,0,0,0,1,0,1,1

%N Bit that is two places to left of least significant 1-bit in the binary expansion of n.

%H Kevin Ryde, <a href="/A086483/b086483.txt">Table of n, a(n) for n = 0..8192</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%e For n = 4, 5, 6, 7, 8 the binary expansions are 100, 101, 110, 111, 1000 and the values of a(n) are respectively 0, 1, 0, 1, 0.

%t Join[{0}, Array[BitGet[#, IntegerExponent[#, 2] + 2] &, 100]] (* _Paolo Xausa_, Apr 02 2024 *)

%o (PARI) a(n) = bittest(n, if(n,valuation(n,2)+2)); \\ _Kevin Ryde_, Apr 07 2022

%Y Cf. A038189.

%K nonn,easy

%O 0,1

%A _N. J. A. Sloane_, Dec 22 2003

%E Corrected and extended by Douglas Gaut (dgaut(AT)ashland.edu), Apr 12 2004

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 26 21:39 EDT 2024. Contains 372004 sequences. (Running on oeis4.)