login
A277822
a(n) = index of the column where n is located in array A277880.
8
0, 1, 1, 2, 1, 2, 3, 1, 1, 2, 3, 1, 4, 1, 1, 2, 1, 2, 3, 1, 4, 1, 1, 2, 5, 1, 1, 2, 1, 2, 3, 1, 1, 2, 3, 1, 4, 1, 1, 2, 5, 1, 1, 2, 1, 2, 3, 1, 6, 1, 1, 2, 1, 2, 3, 1, 1, 2, 3, 1, 4, 1, 1, 2, 1, 2, 3, 1, 4, 1, 1, 2, 5, 1, 1, 2, 1, 2, 3, 1, 6, 1, 1, 2, 1, 2, 3, 1, 1, 2, 3, 1, 4, 1, 1, 2, 7, 1, 1, 2, 1, 2, 3, 1, 1, 2, 3, 1, 4, 1, 1, 2, 1, 2, 3, 1, 4, 1, 1, 2, 5
OFFSET
0,4
COMMENTS
Ordinal transform of A277813.
a(n) = 1 + the number of iterations of map k -> A003188(A006068(k)/2) that are required (when starting from k = n) until k is an odious number.
FORMULA
a(0) = 0, for n >= 1, a(n) = 1 + (A010059(n)*A001511(n)).
a(0) = 0, for n >= 1, if A010060(n) = 1 [when n is one of the odious numbers, A000069], then a(n) = 1, otherwise a(n) = 1 + a(A003188(A006068(n)/2)).
Other identities. For all n >= 1:
a(n) = 1 + a(floor(n/2)) when A010060(n) = 0.
a(n) = 1+A277808(n).
PROG
(Scheme, with memoization-macro definec)
(definec (A277822 n) (cond ((zero? n) n) ((= 1 (A010060 n)) 1) (else (+ 1 (A277822 (A003188 (/ (A006068 n) 2)))))))
;; Other implementations:
(definec (A277822 n) (cond ((zero? n) n) ((= 1 (A010060 n)) 1) (else (+ 1 (A277822 (floor->exact (/ n 2)))))))
(define (A277822 n) (+ 1 (* (A010059 n) (A001511 n))))
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Nov 03 2016
STATUS
approved