login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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