login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A244161 Greedy Catalan Base (A014418) interpreted as base-4 numbers, then shown in decimal. 10
0, 1, 4, 5, 8, 16, 17, 20, 21, 24, 32, 33, 36, 37, 64, 65, 68, 69, 72, 80, 81, 84, 85, 88, 96, 97, 100, 101, 128, 129, 132, 133, 136, 144, 145, 148, 149, 152, 160, 161, 164, 165, 256, 257, 260, 261, 264, 272, 273, 276, 277, 280, 288, 289, 292, 293, 320, 321, 324, 325 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

This representation does not lose any information, because C(n+1)/C(n) [where C(n) is the n-th Catalan number, A000108(n)] approaches 4 from below, but never attains it.

Analogously to "Fibbinary numbers", A003714, this sequence could be called "Catquaternary numbers".

LINKS

Indranil Ghosh, Table of n, a(n) for n = 0..1000

FORMULA

a(0) = 0, a(n) = 4^(A244160(n)-1) + a(n-A000108(A244160(n))). [Where A244160 gives the index of the largest Catalan number that still fits into the sum].

A000035(a(n)) = A000035(A014418(n)). [This sequence and the base-10 version are equal when reduced modulo 2].

PROG

(Scheme, with memoizing definec-macro from Antti Karttunen's IntSeq-library)

;; Version based on direct recurrence:

(definec (A244161 n) (if (zero? n) n (+ (expt 4 (- (A244160 n) 1)) (A244161 (- n (A000108 (A244160 n)))))))

(Python)

from sympy import catalan

def a244160(n):

    if n==0: return 0

    i=1

    while True:

        if catalan(i)>n: break

        else: i+=1

    return i - 1

def a(n):

    if n==0: return 0

    x=a244160(n)

    return 4**(x - 1) + a(n - catalan(x))

print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 08 2017

CROSSREFS

Cf. A000108, A014418, A003714, A085183, A085184, A244160.

Sequence in context: A050892 A274167 A145265 * A258935 A275929 A240794

Adjacent sequences:  A244158 A244159 A244160 * A244162 A244163 A244164

KEYWORD

nonn

AUTHOR

Antti Karttunen, Jun 23 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 14:50 EDT 2021. Contains 343972 sequences. (Running on oeis4.)