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.

Showing 1-3 of 3 results.

A244160 a(0)=0, and for n >= 1, a(n) = the largest k such that k-th Catalan number <= n.

Original entry on oeis.org

0, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6
Offset: 0

Views

Author

Antti Karttunen, Jun 23 2014

Keywords

Comments

Apart from 0, each n occurs A000245(n) times.
For n >= 1, a(n) gives the largest k such that C(k) <= n, where C(k) stands for the k-th Catalan number, A000108(k).

Examples

			For n=1, the largest k such that C(k) <= 1 is 1, thus a(1) = 1.
For n=2, the largest k such that C(k) <= 2 is 2, thus a(2) = 2.
For n=3, the largest k such that C(k) <= 3 is 2, thus a(3) = 2.
For n=4, the largest k such that C(k) <= 4 is 2, thus a(4) = 2.
For n=5, the largest k such that C(k) <= 5 is 3, thus a(5) = 3.
		

Crossrefs

After zero, one less than A081288.

Programs

  • Mathematica
    MapIndexed[ConstantArray[First@ #2 - 1, #1] &, Differences@ Array[CatalanNumber, 8, 0]] /. {} -> {0} // Flatten (* Michael De Vlieger, Jun 08 2017 *)
    Join[{0},Table[PadRight[{},CatalanNumber[n+1]-CatalanNumber[n],n],{n,6}]// Flatten] (* Harvey P. Dale, Aug 23 2021 *)
  • Python
    from sympy import catalan
    def a(n):
        if n==0: return 0
        i=1
        while True:
            if catalan(i)>n: break
            else: i+=1
        return i - 1
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 08 2017
  • Scheme
    (define (A244160 n) (if (zero? n) n (- (A081288 n) 1)))
    

Formula

a(0) = 0, and for n>=1, a(n) = A081288(n)-1.
For all n>=1, A000108(a(n)) = A081290(n).

A244217 Numbers n less than twice the largest Catalan number that is less than or equal to n.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 8, 9, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 132, 133, 134
Offset: 1

Views

Author

Antti Karttunen, Jun 23 2014

Keywords

Comments

Equally: Numbers k such that if m is the largest Catalan number <= k [= A081290(k)], then k < 2*m.
Numbers k such that the Greedy Catalan Base representation of k (A014418(k)) starts with digit 1.

Examples

			41 is not a member, because the largest Catalan number less than or equal to 41 is C(4) = 14, and 41 is not less than 2*14 = 28.
42 is a member, because the largest Catalan number less than or equal to 42 is C(5) = 42 itself, and 42 certainly is less than 2*42 = 84.
See also the examples given for the complement of this sequence: A244216.
		

Crossrefs

Positions of nonzeros in A244215.
Complement of A244216.
Cf. A000108 (a subsequence), A014418, A081290, A244314.

A244216 Numbers n that are at least twice the size the largest Catalan number less than or equal to n.

Original entry on oeis.org

4, 10, 11, 12, 13, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 264
Offset: 1

Views

Author

Antti Karttunen, Jun 23 2014

Keywords

Comments

Equally: Numbers k such that if m is the largest Catalan number <= k [= A081290(k)], then k >= 2*m.
Numbers k such that the Greedy Catalan Base representation of k (cf. A014418) starts with digit 2 or 3.

Examples

			4 is present, as the largest Catalan number (A000108(k), here C(k)) less than or equal to 4 is C(2) = 2, and 4 >= 2*2.
5 is not present, as the largest Catalan number <= 5 is C(3) = 5, and 5 < 2*5.
10 is present, as the largest Catalan number <= 10 is C(3) = 5, and 10 >= 2*5.
11 is present, as the largest Catalan number <= 11 is C(3) = 5, and 11 >= 2*5.
27 is not present, as the largest Catalan number <= 27 is C(4) = 14, and 27 < 2*14.
28 is present, as the largest Catalan number <= 28 is C(4) = 14, and 28 >= 2*14.
		

Crossrefs

Positions of zeros in A244215. Complement of A244217.
Showing 1-3 of 3 results.