login
A086483
Bit that is two places to left of least significant 1-bit in the binary expansion of n.
2
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, 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, 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
OFFSET
0,1
EXAMPLE
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.
MATHEMATICA
Join[{0}, Array[BitGet[#, IntegerExponent[#, 2] + 2] &, 100]] (* Paolo Xausa, Apr 02 2024 *)
PROG
(PARI) a(n) = bittest(n, if(n, valuation(n, 2)+2)); \\ Kevin Ryde, Apr 07 2022
CROSSREFS
Cf. A038189.
Sequence in context: A144196 A156659 A011671 * A337383 A011667 A144195
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Dec 22 2003
EXTENSIONS
Corrected and extended by Douglas Gaut (dgaut(AT)ashland.edu), Apr 12 2004
STATUS
approved