login
A257807
a(n) = number of odd numbers in range 0 .. n of A233271, the infinite trunk of inverted binary beanstalk.
10
0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 7, 7, 7, 8, 8, 9, 10, 11, 11, 12, 12, 12, 13, 13, 13, 13, 14, 15, 15, 15, 16, 16, 16, 17, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 20, 21, 22, 23, 23, 24, 24, 24, 25, 25, 25, 25, 26, 27, 27, 27, 28, 28, 29, 29, 29, 30, 31, 32, 33, 34, 34, 34, 34, 35, 36, 37, 37, 37, 37, 37, 37, 37, 38
OFFSET
0,5
COMMENTS
a(0) = 0; and for n >= 1: a(n) = the largest number k such that A257803(k) <= n.
LINKS
FORMULA
a(0) = 0; for n >= 1, a(n) = A257800(n) + a(n-1).
Other identities:
For all n >= 0, a(n) = A257808(n) - A257806(n).
For all n >= 1, a(A257803(n)) = n. [This sequence works as a left inverse of injection A257803.]
PROG
(Scheme, with memoization-macro definec)
(definec (A257807 n) (if (zero? n) n (+ (A257800 n) (A257807 (- n 1)))))
CROSSREFS
Partial sums of A257800.
Sequence in context: A302931 A227145 A039730 * A152595 A176844 A085182
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 12 2015
STATUS
approved