|
|
A333767
|
|
Length of shortest run of zeros after a one in the binary expansion of n. a(0) = 0.
|
|
3
|
|
|
0, 0, 1, 0, 2, 0, 0, 0, 3, 0, 1, 0, 0, 0, 0, 0, 4, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 1, 0, 2, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 1, 0, 2, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
The binary expansion of 148 is (1,0,0,1,0,1,0,0), so a(148) = 1.
|
|
MATHEMATICA
|
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Table[If[n==0, 0, Min@@stc[n]-1], {n, 0, 100}]
|
|
CROSSREFS
|
Positions of first appearances (ignoring index 0) are A000079.
Positions of terms > 0 are A022340.
The maximum part minus 1 is given by A087117.
All of the following pertain to compositions in standard order (A066099):
- Compositions without 1's are A022340.
- Constant compositions are A272919.
- Weakly decreasing compositions are A114994.
- Weakly increasing compositions are A225620.
- Strictly decreasing compositions are A333255.
- Strictly increasing compositions are A333256.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|