|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
LINKS
|
|
|
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
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Corrected and extended by Douglas Gaut (dgaut(AT)ashland.edu), Apr 12 2004
|
|
STATUS
|
approved
|
|
|
|