|
|
A293668
|
|
First differences of A292046.
|
|
3
|
|
|
1, 2, 3, 1, 4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
a(n) is also the length of n-th run of consecutive integers in the complement of A292046, starting from the 1st run "4, 5".
This sequence is invariant under the following transform: subtract 1 from every term, eliminate zeros. Other sequences with this property include A001511 and other generalized ruler functions, A002260, A272729.
|
|
LINKS
|
|
|
FORMULA
|
If n = 2^k, a(n) = a(k)+1; otherwise a(n) = 1.
a(n) = O(log*(n)), where log* is the iterated logarithm. More precisely, a(n) <= A230864(n+1)+1.
|
|
PROG
|
(PARI) A293668(n) = { my(k=1); while(n && !bitand(n, n-1), n = valuation(n, 2); k++); (k); }; \\ Antti Karttunen, Sep 30 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|