login
A277808
a(n) = number of iterations of map k -> A003188(A006068(k)/2) that are required (when starting from k = n) until k is an odious number.
5
0, 0, 1, 0, 1, 2, 0, 0, 1, 2, 0, 3, 0, 0, 1, 0, 1, 2, 0, 3, 0, 0, 1, 4, 0, 0, 1, 0, 1, 2, 0, 0, 1, 2, 0, 3, 0, 0, 1, 4, 0, 0, 1, 0, 1, 2, 0, 5, 0, 0, 1, 0, 1, 2, 0, 0, 1, 2, 0, 3, 0, 0, 1, 0, 1, 2, 0, 3, 0, 0, 1, 4, 0, 0, 1, 0, 1, 2, 0, 5, 0, 0, 1, 0, 1, 2, 0, 0, 1, 2, 0, 3, 0, 0, 1, 6, 0, 0, 1, 0, 1, 2, 0, 0, 1, 2, 0, 3, 0, 0, 1, 0, 1, 2, 0, 3, 0, 0, 1, 4
OFFSET
1,6
FORMULA
a(n) = A010059(n) * A001511(n).
If A010060(n) = 1 [when n is one of the odious numbers, A000069], then a(n) = 0, otherwise a(n) = 1 + a(A003188(A006068(n)/2)).
Other identities:
For all n >= 0, a(A003945(n)) = n.
PROG
(Scheme, with memoization-macro definec)
(definec (A277808 n) (if (= 1 (A010060 n)) 0 (+ 1 (A277808 (A003188 (/ (A006068 n) 2))))))
;; Other versions:
(define (A277808 n) (if (= 1 (A010060 n)) 0 (A001511 n)))
(define (A277808 n) (* (A010059 n) (A001511 n)))
CROSSREFS
One less than A277822.
A left inverse of A003945.
Cf. A277812 (gives the odious number where such an iteration is finished at when starting from k=n).
Sequence in context: A359865 A035217 A357237 * A105964 A303051 A324044
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Nov 03 2016
STATUS
approved