|
|
A253317
|
|
Indices in A261283 where records occur.
|
|
15
|
|
|
0, 1, 2, 3, 8, 9, 10, 11, 128, 129, 130, 131, 136, 137, 138, 139, 32768, 32769, 32770, 32771, 32776, 32777, 32778, 32779, 32896, 32897, 32898, 32899, 32904, 32905, 32906, 32907, 2147483648, 2147483649, 2147483650, 2147483651, 2147483656, 2147483657
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
These are numbers whose binary indices are all powers of 2, where a binary index of n (row n of A048793) is any position of a 1 in its reversed binary expansion. For example, the terms together with their binary expansions and binary indices begin:
0: 0 ~ {}
1: 1 ~ {1}
2: 10 ~ {2}
3: 11 ~ {1,2}
8: 1000 ~ {4}
9: 1001 ~ {1,4}
10: 1010 ~ {2,4}
11: 1011 ~ {1,2,4}
128: 10000000 ~ {8}
129: 10000001 ~ {1,8}
130: 10000010 ~ {2,8}
131: 10000011 ~ {1,2,8}
136: 10001000 ~ {4,8}
137: 10001001 ~ {1,4,8}
138: 10001010 ~ {2,4,8}
139: 10001011 ~ {1,2,4,8}
(End)
|
|
LINKS
|
|
|
FORMULA
|
|
|
MAPLE
|
a := proc(n) local k, A:
A := [seq(0, i=1..n)]: A[1]:=0:
for k from 1 to n-1 do
A[k+1] := A[k-2^ilog2(k)+1]+2^(2^ilog2(k)-1): od:
# second Maple program:
a:= n-> (l-> add(l[i+1]*2^(2^i-1), i=0..nops(l)-1))(Bits[Split](n-1)):
|
|
MATHEMATICA
|
Nest[Append[#1, #1[[-#2]] + 2^(#2 - 1)] & @@ {#, 2^(IntegerLength[Length[#], 2] - 1)} &, {0, 1}, 36] (* Michael De Vlieger, May 08 2020 *)
|
|
PROG
|
(PARI) a(n)={if(n<=1, 0, my(t=1<<logint(n-1, 2)); a(n-t) + 2^(t-1))} \\ Andrew Howroyd, Dec 20 2019
|
|
CROSSREFS
|
Cf. A053644 (most significant bit).
A070939 gives length of binary expansion.
A096111 gives product of binary indices.
Cf. A058891, A062050, A072639, A326031, A326675, A326702, A367771, A367912, A368183, A368109, A368531.
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|