Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A255062
Number of steps to reach 0 when starting from (2^n)-1 and iterating the map x -> x - (number of runs in binary representation of x): a(n) = A255072(A000225(n)).
15
0, 1, 2, 4, 7, 12, 21, 37, 66, 119, 216, 394, 722, 1330, 2464, 4590, 8591, 16143, 30435, 57550, 109115, 207389, 395046, 754028, 1441972, 2762765, 5303467, 10200386, 19656529, 37948282, 73384081, 142115377, 275551756, 534790473, 1038702981, 2018626773, 3924923938, 7634733313
OFFSET
0,3
COMMENTS
Also, for n >= 1, the number of steps to reach 0 when starting from 2^n and iterating the map x -> x minus A005811(x), the number of runs in binary representation of x.
FORMULA
a(n) = A255072(A000225(n)).
a(0) = 0, a(1) = 1; for n > 1, a(n) = a(n-1) + A255071(n-1).
Other identities. For all n >= 1:
a(n) = A255072(A000079(n)). [See the Comments section.]
a(n) = 1 + A255061(n).
PROG
(Scheme)
(define (A255062 n) (A255072 (A000225 n)))
(define (A255062 n) (if (<= n 1) n (+ (A255062 (- n 1)) (A255071 (- n 1))))) ;; Assuming that A255071 has been already computed, with e.g. the PARI-program given in that entry.
CROSSREFS
One more than A255061.
First differences: A255071 (after the zero term).
Analogous sequences: A213710 (A218600), A219665.
Sequence in context: A014167 A103197 A307543 * A307058 A307060 A218600
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 14 2015
STATUS
approved