%I #13 Nov 16 2016 11:07:52
%S 0,1,2,2,3,3,4,4,4,4,5,5,5,5,6,6,6,6,6,6,7,7,7,7,7,7,8,8,8,8,8,8,8,8,
%T 8,8,9,9,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,
%U 11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12
%N a(n) = the least k such that A000123(k) >= n.
%C Greatest monotonic left inverse of A000123.
%C Each n occurs A018819(n) times.
%H Antti Karttunen, <a href="/A277903/b277903.txt">Table of n, a(n) for n = 1..9828</a>
%F a(n) = A048675(A277905(n)).
%F a(A000123(n)) = n.
%o (Scheme)
%o (definec (A277903 n) (let loop ((k 0)) (if (>= (A000123 k) n) k (loop (+ 1 k)))))
%o (define (A000123 n) (A018819 (+ n n)))
%o (definec (A018819 n) (cond ((zero? n) 1) ((even? n) (+ (A018819 (- n 1)) (A018819 (/ n 2)))) (else (A018819 (- n 1)))))
%Y Cf. A000123, A018819, A048675, A277904, A277905, A278163.
%K nonn
%O 1,3
%A _Antti Karttunen_, Nov 14 2016