cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A244225 a(n) = Number of nonnegative integers 0 <= k <= n, which have an odd representation in Greedy Catalan Base (A014418).

This page as a plain text file.
%I A244225 #9 Jun 25 2014 13:12:29
%S A244225 0,1,1,2,2,2,3,3,4,4,4,5,5,6,6,7,7,8,8,8,9,9,10,10,10,11,11,12,12,13,
%T A244225 13,14,14,14,15,15,16,16,16,17,17,18,18,19,19,20,20,20,21,21,22,22,22,
%U A244225 23,23,24,24,25,25,26,26,26,27,27,28,28,28,29,29,30,30,31,31,32,32,32
%N A244225 a(n) = Number of nonnegative integers 0 <= k <= n, which have an odd representation in Greedy Catalan Base (A014418).
%C A244225 This works also as an inverse function for injection A244223: we have a(A244223(n)) = n for all n >= 1.
%C A244225 Equally, for n >= 1, a(n) = the largest k such that A244223(k) <= n.
%C A244225 After 0, each n occurs A244228(n) times.
%H A244225 Antti Karttunen, <a href="/A244225/b244225.txt">Table of n, a(n) for n = 0..4862</a>
%F A244225 a(n) = n - A244229(n).
%e A244225 The first nonnegative integers represented in Greedy Catalan Base look like:
%e A244225 A014418(0) = 0
%e A244225 A014418(1) = 1
%e A244225 A014418(2) = 10
%e A244225 A014418(3) = 11
%e A244225 A014418(4) = 20
%e A244225 A014418(5) = 100
%e A244225 A014418(6) = 101
%e A244225 Of these, the first "odd" representation (ending with one) occurs at n=1, thus a(0) = 0, but a(1) = 1. As the next odd occurs at n=3, also a(2) = 1, but a(3) = 1+1 = 2. The next odd representation does not occur until at n=6, thus a(4) = a(5) = 2 and a(6) = 3.
%o A244225 (Scheme, with _Antti Karttunen_'s IntSeq-library for memoizing definec-macro)
%o A244225 (definec (A244225 n) (if (<= n 1) n (+ (A244221 n) (A244225 (- n 1)))))
%Y A244225 Partial sums of A244221.
%Y A244225 Cf. A014418, A244223, A244224, A244228, A244229.
%K A244225 nonn
%O A244225 0,4
%A A244225 _Antti Karttunen_, Jun 23 2014