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.

Previous Showing 11-20 of 34 results. Next

A080385 Numbers k such that there are exactly 7 numbers j for which binomial(k, floor(k/2)) / binomial(k,j) is an integer, i.e., A080383(k) = 7.

Original entry on oeis.org

12, 30, 56, 84, 90, 132, 154, 182, 220, 252, 280, 306, 312, 340, 374, 380, 408, 418, 440, 456, 462, 476, 532, 552, 598, 616, 624, 630, 644, 650, 660, 690, 756, 828, 840, 858, 870, 880, 884, 900, 918, 936, 952, 966, 986, 992, 1020, 1054, 1102, 1116, 1140, 1160
Offset: 1

Views

Author

Labos Elemer, Mar 12 2003

Keywords

Examples

			For n=12, the central binomial coefficient (C(12,6) = 924) is divisible by C(12,0), C(12,1), C(12,2), C(12,6), C(12,10), C(12,11), and C(12,12).
		

Crossrefs

Extensions

More terms from Vaclav Kotesovec, Sep 06 2019

A238762 Triangle read by rows, generalized ballot numbers, 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 2, 0, 3, 1, 0, 2, 0, 2, 0, 3, 0, 8, 0, 10, 1, 0, 3, 0, 5, 0, 5, 0, 4, 0, 15, 0, 30, 0, 35, 1, 0, 4, 0, 9, 0, 14, 0, 14, 0, 5, 0, 24, 0, 63, 0, 112, 0, 126, 1, 0, 5, 0, 14, 0, 28, 0, 42, 0, 42, 0, 6, 0, 35, 0, 112, 0, 252, 0, 420, 0, 462
Offset: 0

Views

Author

Peter Luschny, Mar 05 2014

Keywords

Comments

Compare with the definition of the Motzkin triangle A238763.

Examples

			[n\k 0  1  2   3  4   5  6   7]
[0]  1,
[1]  0, 1,
[2]  1, 0, 1,
[3]  0, 2, 0,  3,
[4]  1, 0, 2,  0, 2,
[5]  0, 3, 0,  8, 0, 10,
[6]  1, 0, 3,  0, 5,  0, 5,
[7]  0, 4, 0, 15, 0, 30, 0, 35.
		

References

  • D. E. Knuth, TAOCP, Vol. 4a, Section 7.2.1.6, Eq. 22, p. 451.

Crossrefs

Programs

  • Maple
    binom2 := proc(n, k) local h;
       h := n -> (n-((1-(-1)^n)/2))/2;
       n!/(h(n-k)!*h(n+k)!) end:
    A238762 := proc(n, k) local a,b,c;
       a := iquo(n+k+2+modp(n,2), 2);
       b := iquo(n-k+2, 2);
       c := modp(n+k+1, 2);
       binom2(a,b)*b*c/a end:
    seq(print(seq(A238762(n, k), k=0..n)), n=0..7);
    # Alternativ:
    ballot := proc(p, q) option remember;
        if p = 0 and q = 0 then return 1 fi;
        if p < 0 or  p > q then return 0 fi;
        ballot(p-2, q) + ballot(p, q-2);
        if type(q, odd) then % + ballot(p-1, q-1) fi;
        % end:
  • Mathematica
    T[n_, k_] := T[n, k] = Which[k == 0 && n == 0, 1, k < 0 || k > n, 0, True, s = T[n, k - 2] + T[n - 2, k]; If[OddQ[n], s += T[n - 1, k - 1]]; s];
    Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 10 2019, adapted from Sage code *)
  • Sage
    @CachedFunction
    def ballot(p, q):
        if p == 0 and q == 0: return 1
        if p < 0 or p > q: return 0
        S = ballot(p-2, q) + ballot(p, q-2)
        if q % 2 == 1: S += ballot(p-1, q-1)
        return S
    for q in range(8): [ballot(p, q) for p in (0..q)]

Formula

Definition: T(0, 0) = 1; T(p, q) = 0 if p < 0 or p > q; T(p, q) = T(p-2, q) + (q mod 2) T(p-1, q-1) + T(p, q-2). (The notation is in the style of Knuth, TAOCP 4a (7.2.1.6)).
T(2*k, 2*n) are the classical ballot numbers A009766(n, k).
T(2*k-1, 2*n-1) = A238761(n, k).
T(n,k) = c*A189231(a, b) with a = floor((n + k + (k mod 2))/2), b = floor((n-k)/2) and c = ((n+k+1) mod 2).
T(n, k) = ((n+k+1) mod 2)*((floor(n/2)+floor(k/2) + 1)^(k mod 2)) * (binomial(floor(n/2) + floor(k/2), floor(n/2)) - binomial(floor(n/2) + floor(k/2), floor(n/2) + 1)).
T(n, k) = ((n+k+1) mod 2)*((floor(n/2)+floor(k/2) + 1)^(k mod 2)) * (floor((n-k)/2) + 1)/(floor(n/2) + 1) * binomial(floor(n/2) + floor(k/2), floor(n/2)).
T(n, n) = A057977(n).
T(n, n-2) = A238452(n-1).
Row sums are A238879.

A080384 Numbers k such that there are exactly 6 numbers j for which binomial(k, floor(k/2)) / binomial(k,j) is an integer, i.e., A080383(k) = 6.

Original entry on oeis.org

5, 7, 9, 11, 15, 17, 19, 21, 23, 27, 29, 33, 35, 39, 43, 45, 47, 49, 51, 53, 55, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 87, 89, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 135, 137, 139, 141, 143, 145
Offset: 1

Views

Author

Labos Elemer, Mar 12 2003

Keywords

Examples

			For n=9, the central binomial coefficient (C(9,4) = 126) is divisible by C(9,0), C(9,1), C(9,4), C(9,5), C(9,8), and C(9,9); certain primes are missing, certain composites are here.
		

Crossrefs

Programs

A080386 Numbers k such that there are exactly 8 numbers j for which binomial(k, floor(k/2)) / binomial(k,j) is an integer, i.e., A080383(k) = 8.

Original entry on oeis.org

25, 37, 169, 199, 201, 241, 397, 433, 547, 685, 865, 1045, 1081, 1585, 1657, 1891, 1951, 1969, 2071, 2143, 2647, 2901, 3011, 3025, 3097, 3151, 3251, 3421, 3511, 3727, 4105, 4213, 4453, 4771, 4885, 5581, 5857, 6019, 6031, 6265, 6397, 6967, 7345, 7615, 7831, 8425, 8857, 8929
Offset: 1

Views

Author

Labos Elemer, Mar 12 2003

Keywords

Examples

			For n=25, the central binomial coefficient (C(25,12) = 5200300) is divisible by C(25,0), C(25,1), C(25,3), C(25,12), C(25,13), C(25,22), C(25,24), and C(25,25).
		

Crossrefs

Extensions

More terms from Michel Marcus, Aug 23 2019

A080387 Numbers k such that there are exactly 10 numbers j for which binomial(k, floor(k/2)) / binomial(k,j) is an integer, i.e., A080383(k) = 10.

Original entry on oeis.org

13, 31, 41, 57, 85, 91, 133, 155, 177, 183, 209, 221, 253, 281, 307, 313, 341, 375, 381, 409, 419, 441, 457, 463, 477, 481, 533, 553, 599, 617, 625, 631, 645, 651, 661, 691, 737, 757, 829, 841, 859, 871, 881, 885, 901, 919, 929, 937, 953, 967, 987, 993
Offset: 1

Views

Author

Labos Elemer, Mar 12 2003

Keywords

Examples

			For n=13, the central binomial coefficient (C(13,6) = 1716) is divisible by 10 binomial coefficients C(13,j); the 4 nondivisible cases are C(13,4), C(13,5), C(13,8), and C(13,9).
		

Crossrefs

A189231 Extended Catalan triangle read by rows.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 2, 3, 1, 2, 8, 3, 4, 1, 10, 5, 15, 4, 5, 1, 5, 30, 9, 24, 5, 6, 1, 35, 14, 63, 14, 35, 6, 7, 1, 14, 112, 28, 112, 20, 48, 7, 8, 1, 126, 42, 252, 48, 180, 27, 63, 8, 9, 1, 42, 420, 90, 480, 75, 270, 35, 80, 9, 10, 1, 462, 132, 990, 165, 825, 110, 385, 44, 99, 10, 11, 1
Offset: 0

Views

Author

Peter Luschny, May 01 2011

Keywords

Comments

Let S(n,k) denote the coefficients of the positive powers of the Laurent polynomials C_n(x) = (x+1/x)^(n-1)*(x-1/x)*(x+1/x+n) (if n>0) and C_0(x) = 0.
Then T(n,k) = S(n+1,k+1) for n>=0, k>=0.
The classical Catalan triangle A053121(n,k) can be recovered from this triangle by setting T(n,k) = 0 if n-k is odd.
The complementary Catalan triangle A189230(n,k) can be recovered from this triangle by setting T(n,k) = 0 if n-k is even.
T(n,0) are the extended Catalan numbers A057977(n).

Examples

			The Laurent polynomials:
C(0,x) =                 0
C(1,x) =               x - 1/x
C(2,x) =         x^2 + x - 1/x - 1/x^2
C(3,x) = x^3 + 2 x^2 + x - 1/x - 2/x^2 -1/x^3
Triangle T(n,k) = S(n+1,k+1) starts
[0]   1,
[1]   1,  1,
[2]   1,  2,  1,
[3]   3,  2,  3,  1,
[4]   2,  8,  3,  4,  1,
[5]  10,  5, 15,  4,  5,  1,
[6]   5, 30,  9, 24,  5,  6,  1,
[7]  35, 14, 63, 14, 35,  6,  7, 1,
    [0],[1],[2],[3],[4],[5],[6],[7]
		

Crossrefs

Programs

  • Maple
    A189231_poly := (n,x)-> `if`(n=0,0,(x+1/x)^(n-2)*(x-1/x)*(x+1/x+n-1)):
    seq(print([n],seq(coeff(expand(A189231_poly(n,x)),x,k),k=1..n)),n=1..9);
    A189231 := proc(n,k) option remember; `if`(k>n or k<0, 0, `if`(n=k, 1, A189231(n-1,k-1)+modp(n-k,2)*A189231(n-1,k)+A189231(n-1,k+1))) end:
    seq(print(seq(A189231(n,k),k=0..n)),n=0..9);
  • Mathematica
    t[n_, k_] /; (k > n || k < 0) = 0; t[n_, n_] = 1; t[n_, k_] := t[n, k] = t[n-1, k-1] + Mod[n-k, 2]*t[n-1, k] + t[n-1, k+1]; Table[t[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 30 2013 *)

Formula

Recurrence: If k>n or k<0 then T(n,k) = 0 else if n=k then T(n,k) = 1; otherwise T(n,k) = T(n-1,k-1) + ((n-k) mod 2)*T(n-1,k) + T(n-1,k+1).
S(n,k) = (k/n)* A162246(n,k) for n>0 where S(n,k) are the coefficients from the definition provided the triangle A162246 is indexed in Laurent style by the recurrence: if abs(k) > n then A162246(n,k) = 0 else if n = k then A162246(n,k) = 1 and otherwise A162246(n,k) = A162246(n-1,k-1)+ modp(n-k,2) * A162246(n-1,k) + A162246(n-1,k+1).
Row sums: A189911(n) = A162246(n,n) + A162246(n,n+1) for n>0.

A063549 Smallest number of crossing-free matchings on n points in the plane.

Original entry on oeis.org

1, 1, 3, 2, 10, 5, 35, 14, 126, 42, 462, 132, 1716, 429, 6435, 1430, 24310, 4862, 92378, 16796, 352716, 58786, 1352078, 208012, 5200300, 742900, 20058300, 2674440, 77558760, 9694845, 300540195, 35357670, 1166803110, 129644790, 4537567650
Offset: 1

Views

Author

N. J. A. Sloane, Aug 14 2001

Keywords

Comments

a(n) = Catalan(n/2) if n is even else n*Catalan((n-1)/2) (see Garcia reference). The same as A057977. - Vladeta Jovovic, Mar 20 2010

Crossrefs

Programs

Formula

(n+2)*a(n) -n*a(n-1) +4*(-2*n+1)*a(n-2) +4*(n-1)*a(n-3) +16*(n-3)*a(n-4)=0. - R. J. Mathar, Jun 13 2013
Sum_{n>=1} 1/a(n) = 5/3 + 8*Pi/(9*sqrt(3)). - Amiram Eldar, Aug 20 2022

Extensions

More terms from Jean-François Alcover, Feb 03 2012
a(1) = a(2) = 1 inserted and added Garcia reference from Nathaniel Johnston, Nov 17 2014

A224747 Number of lattice paths from (0,0) to (n,0) that do not go below the x-axis and consist of steps U=(1,1), D=(1,-1) and H=(1,0), where H-steps are only allowed if y=1.

Original entry on oeis.org

1, 0, 1, 1, 3, 5, 12, 23, 52, 105, 232, 480, 1049, 2199, 4777, 10092, 21845, 46377, 100159, 213328, 460023, 981976, 2115350, 4522529, 9735205, 20836827, 44829766, 96030613, 206526972, 442675064, 951759621, 2040962281, 4387156587, 9411145925, 20226421380
Offset: 0

Views

Author

Alois P. Heinz, Apr 17 2013

Keywords

Comments

Also the number of non-capturing (cf. A054391) set-partitions of {1..n} without singletons. - Christian Sievers, Oct 29 2024

Examples

			a(5) = 5: UHHHD, UDUHD, UUDHD, UHDUD, UHUDD.
a(6) = 12: UHHHHD, UDUHHD, UUDHHD, UHDUHD, UHUDHD, UHHDUD, UDUDUD, UUDDUD, UHHUDD, UDUUDD, UUDUDD, UUUDDD.
G.f. = 1 + x^2 + x^3 + 3*x^4 + 5*x^5 + 12*x^6 + 23*x^7 + 52*x^8 + 105*x^9 + ...
		

Crossrefs

Cf. A000108 (without H-steps), A001006 (unrestricted H-steps), A057977 (<=1 H-step).
Cf. A000012, A101455, A125187, A001405 (invert transform).
Inverse binomial transform of A054391.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<5, [1, 0, 1, 1, 3][n+1],
          a(n-1)+ (6*(n-3)*a(n-2) -3*(n-5)*a(n-3)
          -8*(n-4)*a(n-4) -4*(n-4)*a(n-5))/(n-1))
        end:
    seq(a(n), n=0..40);
  • Mathematica
    a[n_] := a[n] = If[n < 5, {1, 0, 1, 1, 3}[[n+1]], a[n-1] + (6*(n-3)*a[n-2] - 3*(n-5)*a[n-3] - 8*(n-4)*a[n-4] - 4*(n-4)*a[n-5])/(n-1)]; Table[a[n], {n, 0, 34}] (* Jean-François Alcover, Jun 20 2013, translated from Maple *)
    a[ n_] := SeriesCoefficient[ (2 - 3 x - 2 x^2 + x Sqrt[1 - 4 x^2]) / (2 (1 - x - 2 x^2 - x^3)), {x, 0, n}] (* Michael Somos, Jan 14 2014 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( (2 - 3*x - 2*x^2 + x * sqrt(1 - 4*x^2 + x * O(x^n)) ) / (2 * (1 - x - 2*x^2 - x^3)), n))} /* Michael Somos, Jan 14 2014 */

Formula

a(n) = Sum_{k=0..floor((n-2)/2)} A009766(2*n-3*k-3, k) for n >= 2. - Johannes W. Meijer, Jul 22 2013
a(2*n) = A125187(n) (bisection). - R. J. Mathar, Jul 27 2013
HANKEL transform is A000012. HANKEL transform omitting a(0) is a period 4 sequence [0, -1, 0, 1, ...] = -A101455. - Michael Somos, Jan 14 2014
Given g.f. A(x), then 0 = A(x)^2 * (x^3 + 2*x^2 + x - 1) + A(x) * (-2*x^2 - 3*x + 2) + (2*x - 1). - Michael Somos, Jan 14 2014
0 = a(n)*(a(n+1) +2*a(n+2) +a(n+3) -a(n+4)) +a(n+1)*(2*a(n+1) +5*a(n+2) +a(n+3) -2*a(n+4)) +a(n+2)*(2*a(n+2) -a(n+3) -a(n+4)) +a(n+3)*(-a(n+3) +a(n+4)). - Michael Somos, Jan 14 2014
G.f.: (2 - 3*x - 2*x^2 + x * sqrt(1 - 4*x^2)) / (2 * (1 - x - 2*x^2 - x^3)). - Michael Somos, Jan 14 2014
D-finite with recurrence (-n+1)*a(n) +(n-1)*a(n-1) +6*(n-3)*a(n-2) +3*(-n+5)*a(n-3) +8*(-n+4)*a(n-4) +4*(-n+4)*a(n-5)=0. - R. J. Mathar, Sep 15 2021

A077587 a(n) = C(n+1) + n*C(n) where C = A000108 (Catalan numbers).

Original entry on oeis.org

1, 3, 9, 29, 98, 342, 1221, 4433, 16302, 60554, 226746, 854658, 3239044, 12332140, 47137005, 180780345, 695367510, 2681600130, 10364759790, 40142121030, 155748675420, 605274171060, 2355676013730, 9180275261274, 35819645937228
Offset: 0

Views

Author

Michael Somos, Nov 09 2002

Keywords

Comments

Number of ascents of length 2 starting at an even level in all Dyck paths of semilength n+2. Example: a(1)=3 because all Dyck paths of semilength 3 are UDUDUD, UD(UU)DD, (UU)DDUD, (UU)DUDD and UUUDDD, where U=(1,1), D=(1,-1), having altogether 3 ascents of length 2 that start at an even level (shown between parentheses). - Emeric Deutsch, Nov 29 2005
a(n) is the number of parking functions of size n+1 avoiding the patterns 132, 231, and 321. - Lara Pudwell, Apr 10 2023

Crossrefs

Programs

  • Maple
    egf := x -> exp(2*x)*(1+1/x)*BesselI(1, 2*x);
    seq(n!*coeff(series(egf(x), x, n+2), x, n), n=0..24); # Peter Luschny, Apr 14 2014
  • Mathematica
    Table[(CatalanNumber[n + 1] + n CatalanNumber[n]), {n, 0, 40}] (* Vincenzo Librandi, Apr 15 2014 *)
  • PARI
    a(n)=if(n<0,0,(n^2+6*n+2)*(2*n)!/n!/(n+2)!)
    
  • PARI
    a(n)=if(n<0,0,polcoeff((4+x+1/x-(x+1/x)^2)*(1+x)^(2*n),n)/2)

Formula

a(n) = binomial(2n+1, n+1) - binomial(2n, n+2).
a(n) = (3*(3*n+2)*a(n-1) - 2*(11*n-7)*a(n-2) + 4*(2*n-5)*a(n-3))/(n+2), n>2.
G.f.: A(x) = (1 - 3*x - (1-5*x+2*x^2)/sqrt(1-4*x) )/(2*x^2) satisfies 0 = (x^2+4*x-1) + (12*x^2-7*x+1)*A + (4*x^3-x^2)*A^2.
E.g.f.: A(x) = (1+x)B(x)' where B(x) = e.g.f. of A000108.
a(n) = Sum_{k=0..n} binomial(n,k)*A057977(k)*2^(n-k); here the A057977 are understood as the extended Catalan numbers (see also A063549). Related to Touchard's identity. - Peter Luschny, Jul 14 2016
a(n) ~ 4^n/sqrt(Pi*n). - Ilya Gutkovskiy, Jul 14 2016
Asymptotic starts a(n) ~ (4^n/sqrt(Pi*n))*(1 + (23/2^3)/n - (1199/2^7)/n^2 +(22685/2^10)/n^3 - (1562421/2^15)/n^4 + ... ). - Peter Luschny, Jul 14 2016

A241543 a(n) = A241477(n, n).

Original entry on oeis.org

1, 1, 2, 2, 2, 6, 4, 20, 10, 70, 28, 252, 84, 924, 264, 3432, 858, 12870, 2860, 48620, 9724, 184756, 33592, 705432, 117572, 2704156, 416024, 10400600, 1485800, 40116600, 5348880, 155117520, 19389690, 601080390, 70715340, 2333606220, 259289580, 9075135300
Offset: 0

Views

Author

Peter Luschny, Apr 25 2014

Keywords

Comments

See A241477 and A232500 for the combinatorial definitions.

Crossrefs

Programs

  • Maple
    A241543 := proc(n)
        if n < 2 then 1
      else 2*iquo(n,2)*(n-2)!/iquo(n,2)!^2
        fi end:
    seq(A241543(n), n=0..37);

Formula

a(n) = 2*floor(n/2)*(n-2)!/floor(n/2)!^2 for n>=2.
a(n+2) = 2*A057977(n) for n>=0. - Peter Luschny, Jul 17 2016
Previous Showing 11-20 of 34 results. Next