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-10 of 14 results. Next

A033484 a(n) = 3*2^n - 2.

Original entry on oeis.org

1, 4, 10, 22, 46, 94, 190, 382, 766, 1534, 3070, 6142, 12286, 24574, 49150, 98302, 196606, 393214, 786430, 1572862, 3145726, 6291454, 12582910, 25165822, 50331646, 100663294, 201326590, 402653182, 805306366, 1610612734, 3221225470
Offset: 0

Views

Author

Keywords

Comments

Number of nodes in rooted tree of height n in which every node (including the root) has valency 3.
Pascal diamond numbers: reflect Pascal's n-th triangle vertically and sum all elements. E.g., a(3)=1+(1+1)+(1+2+1)+(1+1)+1. - Paul Barry, Jun 23 2003
Number of 2 X n binary matrices avoiding simultaneously the right-angled numbered polyomino patterns (ranpp) (00;1), (10;0) and (11;0). An occurrence of a ranpp (xy;z) in a matrix A=(a(i,j)) is a triple (a(i1,j1), a(i1,j2), a(i2,j1)) where i1 < i2 and j1 < j2 and these elements are in the same relative order as those in the triple (x,y,z). - Sergey Kitaev, Nov 11 2004
Binomial and inverse binomial transform are in A001047 (shifted) and A122553. - R. J. Mathar, Sep 02 2008
a(n) = (Sum_{k=0..n-1} a(n)) + (2*n + 1); e.g., a(3) = 22 = (1 + 4 + 10) + 7. - Gary W. Adamson, Jan 21 2009
Let P(A) be the power set of an n-element set A and R be a relation on P(A) such that for all x, y of P(A), xRy if either 0) x is a proper subset of y or y is a proper subset of x and x and y are disjoint, or 1) x equals y. Then a(n) = |R|. - Ross La Haye, Mar 19 2009
Equals the Jacobsthal sequence A001045 convolved with (1, 3, 4, 4, 4, 4, 4, ...). - Gary W. Adamson, May 24 2009
Equals the eigensequence of a triangle with the odd integers as the left border and the rest 1's. - Gary W. Adamson, Jul 24 2010
An elephant sequence, see A175655. For the central square four A[5] vectors, with decimal values 58, 154, 178 and 184, lead to this sequence. For the corner squares these vectors lead to the companion sequence A097813. - Johannes W. Meijer, Aug 15 2010
a(n+2) is the integer with bit string "10" * "1"^n * "10".
a(n) = A027383(2n). - Jason Kimberley, Nov 03 2011
a(n) = A153893(n)-1 = A083416(2n+1). - Philippe Deléham, Apr 14 2013
a(n) = A082560(n+1,A000079(n)) = A232642(n+1,A128588(n+1)). - Reinhard Zumkeller, May 14 2015
a(n) is the sum of the entries in the n-th and (n+1)-st rows of Pascal's triangle minus 2. - Stuart E Anderson, Aug 27 2017
Also the number of independent vertex sets and vertex covers in the complete tripartite graph K_{n,n,n}. - Eric W. Weisstein, Sep 21 2017
Apparently, a(n) is the least k such that the binary expansion of A000045(k) ends with exactly n+1 ones. - Rémy Sigrist, Sep 25 2021
a(n) is the number of root ancestral configurations for a pair consisting of a matching gene tree and species tree with the modified lodgepole shape and n+1 cherry nodes. - Noah A Rosenberg, Jan 16 2025

Examples

			Binary: 1, 100, 1010, 10110, 101110, 1011110, 10111110, 101111110, 1011111110, 10111111110, 101111111110, 1011111111110, 10111111111110,
G.f. = 1 + 4*x + 10*x^2 + 22*x^3 + 46*x^4 + 94*x^5 + 190*x^6 + 382*x^7 + ...
		

References

  • J. Riordan, Series-parallel realization of the sum modulo 2 of n switching variables, in Claude Elwood Shannon: Collected Papers, edited by N. J. A. Sloane and A. D. Wyner, IEEE Press, NY, 1993, pp. 877-878.

Crossrefs

Programs

  • GAP
    List([0..35], n-> 3*2^n -2); # G. C. Greubel, Nov 18 2019
  • Haskell
    a033484 = (subtract 2) . (* 3) . (2 ^)
    a033484_list = iterate ((subtract 2) . (* 2) . (+ 2)) 1
    -- Reinhard Zumkeller, Apr 23 2013
    
  • Magma
    [3*2^n-2: n in [1..36]]; // Vincenzo Librandi, Nov 22 2010
    
  • Maple
    with(combinat):a:=n->stirling2(n,2)+stirling2(n+1,2): seq(a(n), n=1..35); # Zerinvary Lajos, Oct 07 2007
    a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=(a[n-1]+1)*2 od: seq(a[n], n=1..35); # Zerinvary Lajos, Feb 22 2008
  • Mathematica
    Table[3 2^n - 2, {n, 0, 35}] (* Vladimir Joseph Stephan Orlovsky, Dec 16 2008 *)
    (* Start from Eric W. Weisstein, Sep 21 2017 *)
    3*2^Range[0, 35] - 2
    LinearRecurrence[{3, -2}, {1, 4}, 36]
    CoefficientList[Series[(1+x)/(1-3x+2x^2), {x, 0, 35}], x] (* End *)
  • PARI
    a(n) = 3<Charles R Greathouse IV, Nov 02 2011
    
  • Sage
    [3*2^n -2 for n in (0..35)] # G. C. Greubel, Nov 18 2019
    

Formula

G.f.: (1+x)/(1-3*x+2*x^2).
a(n) = 2*(a(n-1) + 1) for n>0, with a(0)=1.
a(n) = A007283(n) - 2.
G.f. is equivalent to (1-2*x-3*x^2)/((1-x)*(1-2*x)*(1-3*x)). - Paul Barry, Apr 28 2004
From Reinhard Zumkeller, Oct 09 2004: (Start)
A099257(a(n)) = A099258(a(n)) = a(n).
a(n) = 2*A055010(n) = (A068156(n) - 1)/2. (End)
Row sums of triangle A130452. - Gary W. Adamson, May 26 2007
Row sums of triangle A131110. - Gary W. Adamson, Jun 15 2007
Binomial transform of (1, 3, 3, 3, ...). - Gary W. Adamson, Oct 17 2007
Row sums of triangle A051597 (a triangle generated from Pascal's rule given right and left borders = 1, 2, 3, ...). - Gary W. Adamson, Nov 04 2007
Equals A132776 * [1/1, 1/2, 1/3, ...]. - Gary W. Adamson, Nov 16 2007
a(n) = Sum_{k=0..n} A112468(n,k)*3^k. - Philippe Deléham, Feb 23 2014
a(n) = -(2^n) * A036563(1-n) for all n in Z. - Michael Somos, Jul 04 2017
E.g.f.: 3*exp(2*x) - 2*exp(x). - G. C. Greubel, Nov 18 2019

A051924 a(n) = binomial(2*n,n) - binomial(2*n-2,n-1); or (3n-2)*C(n-1), where C = Catalan numbers (A000108).

Original entry on oeis.org

1, 4, 14, 50, 182, 672, 2508, 9438, 35750, 136136, 520676, 1998724, 7696444, 29716000, 115000920, 445962870, 1732525830, 6741529080, 26270128500, 102501265020, 400411345620, 1565841089280, 6129331763880, 24014172955500, 94163002754652, 369507926510352
Offset: 1

Views

Author

Barry E. Williams, Dec 19 1999

Keywords

Comments

Number of partitions with Ferrers plots that fit inside an n X n box, but not in an n-1 X n-1 box. - Wouter Meeussen, Dec 10 2001
From Benoit Cloitre, Jan 29 2002: (Start)
Let m(1,j)=j, m(i,1)=i and m(i,j) = m(i-1,j) + m(i,j-1); then a(n) = m(n,n):
1 2 3 4 ...
2 4 7 11 ...
3 7 14 25 ...
4 11 25 50 ... (End)
This sequence also gives the number of clusters and non-crossing partitions of type D_n. - F. Chapoton, Jan 31 2005
If Y is a 2-subset of a 2n-set X then a(n) is the number of (n+1)-subsets of X intersecting Y. - Milan Janjic, Nov 18 2007
Prefaced with a 1: (1, 1, 4, 14, 50, ...) and convolved with the Catalan sequence = A097613: (1, 2, 7, 25, 91, ...). - Gary W. Adamson, May 15 2009
Total number of up steps before the second return in all Dyck n-paths. - David Scambler, Aug 21 2012
Conjecture: a(n) mod n^2 = n+2 iff n is an odd prime. - Gary Detlefs, Feb 19 2013
First differences of A000984 and A030662. - J. M. Bergot, Jun 22 2013
From R. J. Mathar, Jun 30 2013: (Start)
Equivalent to the Meeussen comment and the Bergot comment: The array view of A007318 is
1, 1, 1, 1, 1, 1,
1, 2, 3, 4, 5, 6,
1, 3, 6, 10, 15, 21,
1, 4, 10, 20, 35, 56,
1, 5, 15, 35, 70, 126,
1, 6, 21, 56, 126, 252,
and a(n) are the hook sums Sum_{k=0..n} A(n,k) + Sum_{r=0..n-1} A(r,n). (End)
From Gus Wiseman, Apr 12 2019: (Start)
Equivalent to Wouter Meeussen's comment, a(n) is the number of integer partitions (of any positive integer) such that the maximum of the length and the largest part is n. For example, the a(1) = 1 through a(3) = 14 partitions are:
(1) (2) (3)
(11) (31)
(21) (32)
(22) (33)
(111)
(211)
(221)
(222)
(311)
(321)
(322)
(331)
(332)
(333)
(End)
Coxeter-Catalan numbers for Coxeter groups of type D_n [Armstrong]. - N. J. A. Sloane, Mar 09 2022
a(n+1) is the number of ways that a best of n pairs contest with early termination can go. For example, the first stage of an association football (soccer) penalty-kick shoot out has n=5 pairs of shots and there are a(6)=672 distinct ways it can go. For n=2 pairs, writing G for goal and M for miss, and listing the up-to-four shots in chronological order with teams alternating shots, the n(3)=14 possibilities are MMMM, MMMG, MMGM, MMGG, MGM, MGGM, MGGG, GMMM, GMMG, GMG, GGMM, GGMG, GGGM, and GGGG. Not all four shots are taken in two cases because it becomes impossible for one team to overcome the lead of the other team. - Lee A. Newberg, Jul 20 2024

Examples

			Sums of {1}, {2, 1, 1}, {2, 2, 3, 3, 2, 1, 1}, {2, 2, 4, 5, 7, 6, 7, 5, 5, 3, 2, 1, 1}, ...
		

References

  • Drew Armstrong, Generalized Noncrossing Partitions and Combinatorics of Coxeter Groups, Mem. Amer. Math. Soc. 202 (2009), no. 949, x+159. MR 2561274 16; See Table 2.8.

Crossrefs

Left-central elements of the (1, 2)-Pascal triangle A029635.
Column sums of A096771.
Cf. A000108, A024482 (diagonal from 2), A076540 (diagonal from 3), A000124 (row from 2), A004006 (row from 3), A006522 (row from 4).
Cf. A128064; first differences of A000984.
Cf. A097613.

Programs

  • Haskell
    a051924 n = a051924_list !! (n-1)
    a051924_list = zipWith (-) (tail a000984_list) a000984_list
    -- Reinhard Zumkeller, May 25 2013
    
  • Magma
    [Binomial(2*n, n)-Binomial(2*n-2, n-1): n in [1..28]]; // Vincenzo Librandi, Dec 21 2016
  • Maple
    C:= n-> binomial(2*n, n)/(n+1): seq((n+1)*C(n)-n*C(n-1), n=1..25); # Emeric Deutsch, Jan 08 2008
    Z:=(1-z-sqrt(1-4*z))/sqrt(1-4*z): Zser:=series(Z, z=0, 32): seq(coeff(Zser, z, n), n=1..24); # Zerinvary Lajos, Jan 01 2007
    a := n -> 2^(-2+2*n)*GAMMA(-1/2+n)*(3*n-2)/(sqrt(Pi)*GAMMA(1+n)):
    seq(simplify(a(n)), n=1..24); # Peter Luschny, Dec 14 2015
  • Mathematica
    Table[Binomial[2n,n]-Binomial[2n-2,n-1],{n,30}] (* Harvey P. Dale, Jan 15 2012 *)
  • PARI
    a(n)=binomial(2*n,n)-binomial(2*n-2,n-1) \\ Charles R Greathouse IV, Jun 25 2013
    
  • PARI
    {a(n)=polcoeff((1-x) / sqrt(1-4*x +x*O(x^n)) - 1,n)}
    for(n=1,30,print1(a(n),", ")) \\ Paul D. Hanna, Nov 08 2014
    
  • PARI
    {a(n)=polcoeff( sum(m=1, n, x^m * sum(k=0, m, binomial(m, k)^2 * x^k) / (1-x +x*O(x^n))^(2*m)), n)}
    for(n=1, 30, print1(a(n), ", ")) \\ Paul D. Hanna, Nov 08 2014
    
  • Sage
    a = lambda n: 2^(-2+2*n)*gamma(n-1/2)*(3*n-2)/(sqrt(pi)*gamma(1+n))
    [a(n) for n in (1..120)] # Peter Luschny, Dec 14 2015
    

Formula

G.f.: (1-x) / sqrt(1-4*x) - 1. - Paul D. Hanna, Nov 08 2014
G.f.: Sum_{n>=1} x^n/(1-x)^(2*n) * Sum_{k=0..n} C(n,k)^2 * x^k. - Paul D. Hanna, Nov 08 2014
a(n+1) = binomial(2*n, n) + 2*Sum_{i=0..n-1} binomial(n+i, i) (V's in Pascal's Triangle). - Jon Perry Apr 13 2004
a(n) = n*C(n-1) - (n-1)*C(n-2), where C(n) = A000108(n) = Catalan(n). For example, a(5) = 50 = 5*C(4) - 4*C(3) - 5*14 - 3*5 = 70 - 20. Triangle A128064 as an infinite lower triangular matrix * A000108 = A051924 prefaced with a 1: (1, 1, 4, 14, 50, 182, ...). - Gary W. Adamson, May 15 2009
Sum of 3 central terms of Pascal's triangle: 2*C(2+2*n, n)+C(2+2*n, 1+n). - Zerinvary Lajos, Dec 20 2005
a(n+1) = A051597(2n,n). - Philippe Deléham, Nov 26 2006
The sequence 1,1,4,... has a(n) = C(2*n,n)-C(2*(n-1),n-1) = 0^n+Sum_{k=0..n} C(n-1,k-1)*A002426(k), and g.f. given by (1-x)/(1-2*x-2*x^2/(1-2*x-x^2/(1-2*x-x^2/(1-2*x-x^2/(1-.... (continued fraction). - Paul Barry, Oct 17 2009
a(n) = (3*n-2)*(2*n-2)!/(n*(n-1)!^2) = A001700(n) + A001791(n-1). - David Scambler, Aug 21 2012
D-finite with recurrence: a(n) = 2*(3*n-2)*(2*n-3)*a(n-1)/(n*(3*n-5)). - Alois P. Heinz, Apr 25 2014
a(n) = 2^(-2+2*n)*Gamma(-1/2+n)*(3*n-2)/(sqrt(Pi)*Gamma(1+n)). - Peter Luschny, Dec 14 2015
a(n) ~ (3/4)*4^n*(1-(7/24)/n-(7/128)/n^2-(85/3072)/n^3-(581/32768)/n^4-(2611/262144)/n^5)/sqrt(n*Pi). - Peter Luschny, Dec 16 2015
E.g.f.: ((1 - x)*BesselI(0,2*x) + x*BesselI(1,2*x))*exp(2*x) - 1. - Ilya Gutkovskiy, Dec 20 2016
a(n) = 2 * A097613(n) for n > 1. - Bruce J. Nicholson, Jan 06 2019
Sum_{n>=1} a(n)/8^n = 7/(4*sqrt(2)) - 1. - Amiram Eldar, May 06 2023

Extensions

Edited by N. J. A. Sloane, May 03 2008, at the suggestion of R. J. Mathar

A228196 A triangle formed like Pascal's triangle, but with n^2 on the left border and 2^n on the right border instead of 1.

Original entry on oeis.org

0, 1, 2, 4, 3, 4, 9, 7, 7, 8, 16, 16, 14, 15, 16, 25, 32, 30, 29, 31, 32, 36, 57, 62, 59, 60, 63, 64, 49, 93, 119, 121, 119, 123, 127, 128, 64, 142, 212, 240, 240, 242, 250, 255, 256, 81, 206, 354, 452, 480, 482, 492, 505, 511, 512, 100, 287, 560, 806, 932, 962, 974, 997, 1016, 1023, 1024
Offset: 1

Views

Author

Boris Putievskiy, Aug 15 2013

Keywords

Comments

The third row is (n^4 - n^2 + 24*n + 24)/12.
For a closed-form formula for generalized Pascal's triangle see A228576. - Boris Putievskiy, Sep 04 2013

Examples

			The start of the sequence as a triangular array read by rows:
   0;
   1,  2;
   4,  3,  4;
   9,  7,  7,  8;
  16, 16, 14, 15, 16;
  25, 32, 30, 29, 31, 32;
  36, 57, 62, 59, 60, 63, 64;
		

Crossrefs

Cf. We denote Pascal-like triangle with L(n) on the left border and R(n) on the right border by (L(n),R(n)). A007318 (1,1), A008949 (1,2^n), A029600 (2,3), A029618 (3,2), A029635 (1,2), A029653 (2,1), A037027 (Fibonacci(n),1), A051601 (n,n) n>=0, A051597 (n,n) n>0, A051666 (n^2,n^2), A071919 (1,0), A074829 (Fibonacci(n), Fibonacci(n)), A074909 (1,n), A093560 (3,1), A093561 (4,1), A093562 (5,1), A093563 (6,1), A093564 (7,1), A093565 (8,1), A093644 (9,1), A093645 (10,1), A095660 (1,3), A095666 (1,4), A096940 (1,5), A096956 (1,6), A106516 (3^n,1), A108561(1,(-1)^n), A132200 (4,4), A134636 (2n+1,2n+1), A137688 (2^n,2^n), A160760 (3^(n-1),1), A164844(1,10^n), A164847 (100^n,1), A164855 (101*100^n,1), A164866 (101^n,1), A172171 (1,9), A172185 (9,11), A172283 (-9,11), A177954 (int(n/2),1), A193820 (1,2^n), A214292 (n,-n), A227074 (4^n,4^n), A227075 (3^n,3^n), A227076 (5^n,5^n), A227550 (n!,n!), A228053 ((-1)^n,(-1)^n), A228074 (Fibonacci(n), n).
Cf. A000290 (row 1), A153056 (row 2), A000079 (column 1), A000225 (column 2), A132753 (column 3), A118885 (row sums of triangle array + 1), A228576 (generalized Pascal's triangle).

Programs

  • GAP
    T:= function(n,k)
        if k=0 then return n^2;
        elif k=n then return 2^n;
        else return T(n-1,k-1) + T(n-1,k);
        fi;
      end;
    Flat(List([0..12], n-> List([0..n], k-> T(n,k) ))); # G. C. Greubel, Nov 12 2019
  • Maple
    T:= proc(n, k) option remember;
          if k=0 then n^2
        elif k=n then 2^k
        else T(n-1, k-1) + T(n-1, k)
          fi
        end:
    seq(seq(T(n, k), k=0..n), n=0..10); # G. C. Greubel, Nov 12 2019
  • Mathematica
    T[n_, k_]:= T[n, k] = If[k==0, n^2, If[k==n, 2^k, T[n-1, k-1] + T[n-1, k]]]; Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten (* G. C. Greubel, Nov 12 2019 *)
    Flatten[Table[Sum[i^2 Binomial[n-1-i, n-k-i], {i,1,n-k}] + Sum[2^i Binomial[n-1-i, k-i], {i,1,k}], {n,0,10}, {k,0,n}]] (* Greg Dresden, Aug 06 2022 *)
  • PARI
    T(n,k) = if(k==0, n^2, if(k==n, 2^k, T(n-1, k-1) + T(n-1, k) )); \\ G. C. Greubel, Nov 12 2019
    
  • Python
    def funcL(n):
       q = n**2
       return q
    def funcR(n):
       q = 2**n
       return q
    for n in range (1,9871):
       t=int((math.sqrt(8*n-7) - 1)/ 2)
       i=n-t*(t+1)/2-1
       j=(t*t+3*t+4)/2-n-1
       sum1=0
       sum2=0
       for m1 in range (1,i+1):
          sum1=sum1+funcR(m1)*binomial(i+j-m1-1,i-m1)
       for m2 in range (1,j+1):
          sum2=sum2+funcL(m2)*binomial(i+j-m2-1,j-m2)
       sum=sum1+sum2
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k==0): return n^2
        elif (k==n): return 2^n
        else: return T(n-1, k-1) + T(n-1, k)
    [[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 12 2019
    

Formula

T(n,0) = n^2, n>0; T(0,k) = 2^k; T(n, k) = T(n-1, k-1) + T(n-1, k) for n,k > 0. [corrected by G. C. Greubel, Nov 12 2019]
Closed-form formula for general case. Let L(m) and R(m) be the left border and the right border of Pascal like triangle, respectively. We denote binomial(n,k) by C(n,k).
As table read by antidiagonals T(n,k) = Sum_{m1=1..n} R(m1)*C(n+k-m1-1, n-m1) + Sum_{m2=1..k} L(m2)*C(n+k-m2-1, k-m2); n,k >=0.
As linear sequence a(n) = Sum_{m1=1..i} R(m1)*C(i+j-m1-1, i-m1) + Sum_{m2=1..j} L(m2)*C(i+j-m2-1, j-m2), where i=n-t*(t+1)/2-1, j=(t*t+3*t+4)/2-n-1, t=floor((-1+sqrt(8*n-7))/2); n>0.
Some special cases. If L(m)={b,b,b...} b*A000012, then the second sum takes form b*C(n+k-1,j). If L(m) is {0,b,2b,...} b*A001477, then the second sum takes form b*C(n+k,n-1). Similarly for R(m) and the first sum.
For this sequence L(m)=m^2 and R(m)=2^m.
As table read by antidiagonals T(n,k) = Sum_{m1=1..n} (2^m1)*C(n+k-m1-1, n-m1) + Sum_{m2=1..k} (m2^2)*C(n+k-m2-1, k-m2); n,k >=0.
As linear sequence a(n) = Sum_{m1=1..i} (2^m1)*C(i+j-m1-1, i-m1) + Sum_{m2=1..j} (m2^2)*C(i+j-m2-1, j-m2), where i=n-t*(t+1)/2-1, j=(t*t+3*t+4)/2-n-1, t=floor((-1+sqrt(8*n-7))/2).
As a triangular array read by rows, T(n,k) = Sum_{i=1..n-k} i^2*C(n-1-i, n-k-i) + Sum_{i=1..k} 2^i*C(n-1-i, k-i); n,k >=0. - Greg Dresden, Aug 06 2022

Extensions

Cross-references corrected and extended by Philippe Deléham, Dec 27 2013

A051601 Rows of triangle formed using Pascal's rule except we begin and end the n-th row with n.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 3, 4, 4, 3, 4, 7, 8, 7, 4, 5, 11, 15, 15, 11, 5, 6, 16, 26, 30, 26, 16, 6, 7, 22, 42, 56, 56, 42, 22, 7, 8, 29, 64, 98, 112, 98, 64, 29, 8, 9, 37, 93, 162, 210, 210, 162, 93, 37, 9, 10, 46, 130, 255, 372, 420, 372, 255, 130, 46, 10
Offset: 0

Views

Author

Keywords

Comments

The number of spotlight tilings of an m X n rectangle missing the southeast corner. E.g., there are 2 spotlight tilings of a 2 X 2 square missing its southeast corner. - Bridget Tenner, Nov 10 2007
T(n,k) = A134636(n,k) - A051597(n,k). - Reinhard Zumkeller, Nov 23 2012
For a closed-form formula for arbitrary left and right borders of Pascal like triangle see A228196. - Boris Putievskiy, Aug 18 2013
For a closed-form formula for generalized Pascal's triangle see A228576. - Boris Putievskiy, Sep 09 2013

Examples

			From _Roger L. Bagula_, Feb 17 2009: (Start)
Triangle begins:
   0;
   1,  1;
   2,  2,   2;
   3,  4,   4,   3;
   4,  7,   8,   7,    4;
   5, 11,  15,  15,   11,    5;
   6, 16,  26,  30,   26,   16,   6;
   7, 22,  42,  56,   56,   42,   22,    7;
   8, 29,  64,  98,  112,   98,   64,   29,   8;
   9, 37,  93, 162,  210,  210,  162,   93,   37,   9;
  10, 46, 130, 255,  372,  420,  372,  255,  130,  46,  10;
  11, 56, 176, 385,  627,  792,  792,  627,  385, 176,  56, 11;
  12, 67, 232, 561, 1012, 1419, 1584, 1419, 1012, 561, 232, 67, 12. ... (End)
		

Crossrefs

Row sums give A000918(n+1).
Columns from 2 to 9, respectively: A000124; A000125, A055795, A027660, A055796, A055797, A055798, A055799 (except 1 for the last seven). [Bruno Berselli, Aug 02 2013]
Cf. A001477, A162551 (central terms).

Programs

  • GAP
    Flat(List([0..12], n-> List([0..n], k->  Binomial(n, k+1) + Binomial(n, n-k+1) ))); # G. C. Greubel, Nov 12 2019
  • Haskell
    a051601 n k = a051601_tabl !! n !! k
    a051601_row n = a051601_tabl !! n
    a051601_tabl = iterate
                   (\row -> zipWith (+) ([1] ++ row) (row ++ [1])) [0]
    -- Reinhard Zumkeller, Nov 23 2012
    
  • Magma
    /* As triangle: */ [[Binomial(n,m+1)+Binomial(n,n-m+1): m in [0..n]]: n in [0..12]]; // Bruno Berselli, Aug 02 2013
    
  • Maple
    seq(seq(binomial(n,k+1) + binomial(n, n-k+1), k=0..n), n=0..12); # G. C. Greubel, Nov 12 2019
  • Mathematica
    T[n_, k_]:= T[n, k] = Binomial[n, k+1] + Binomial[n, n-k+1];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* Roger L. Bagula, Feb 17 2009; modified by G. C. Greubel, Nov 12 2019 *)
  • PARI
    T(n,k) = binomial(n, k+1) + binomial(n, n-k+1);
    for(n=0,12, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Nov 12 2019
    
  • Sage
    [[binomial(n, k+1) + binomial(n, n-k+1) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 12 2019
    

Formula

T(m,n) = binomial(m+n,m) - 2*binomial(m+n-2,m-1), up to offset and transformation of array to triangular indices. - Bridget Tenner, Nov 10 2007
T(n,k) = binomial(n, k+1) + binomial(n, n-k+1). - Roger L. Bagula, Feb 17 2009
T(0,n) = T(n,0) = n, T(n,k) = T(n-1,k) + T(n-1,k-1), 0 < k < n.

A072405 Triangle T(n, k) = C(n,k) - C(n-2,k-1) for n >= 3 and T(n, k) = 1 otherwise, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 3, 4, 3, 1, 1, 4, 7, 7, 4, 1, 1, 5, 11, 14, 11, 5, 1, 1, 6, 16, 25, 25, 16, 6, 1, 1, 7, 22, 41, 50, 41, 22, 7, 1, 1, 8, 29, 63, 91, 91, 63, 29, 8, 1, 1, 9, 37, 92, 154, 182, 154, 92, 37, 9, 1, 1, 10, 46, 129, 246, 336, 336, 246, 129, 46, 10, 1, 1, 11, 56, 175, 375, 582, 672, 582, 375, 175, 56, 11, 1
Offset: 0

Views

Author

Henry Bottomley, Jun 16 2002

Keywords

Comments

Starting 1,0,1,1,1,... this is the Riordan array ((1-x+x^2)/(1-x), x/(1-x)). Its diagonal sums are A006355. Its inverse is A106509. - Paul Barry, May 04 2005

Examples

			Rows start as:
  1;
  1, 1;
  1, 1,  1; (key row for starting the recurrence)
  1, 2,  2,  1;
  1, 3,  4,  3,  1;
  1, 4,  7,  7,  4, 1;
  1, 5, 11, 14, 11, 5, 1;
		

Crossrefs

Row sums give essentially A003945, A007283, or A042950.
Cf. A072406 for number of odd terms in each row.
Cf. A051597, A096646, A122218 (identical for n > 1).
Cf. A007318 (q=0), A072405 (q= -1), A173117 (q=1), A173118 (q=2), A173119 (q=3), A173120 (q=-4).

Programs

  • Magma
    T:= func< n,k | n lt 3 select 1 else Binomial(n,k) - Binomial(n-2,k-1) >;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 28 2021
    
  • Mathematica
    t[2, 1] = 1; t[n_, n_] = t[, 0] = 1; t[n, k_] := t[n, k] = t[n-1, k-1] + t[n-1, k]; Table[t[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 28 2013, after Ralf Stephan *)
  • PARI
    A072405(n, k) = if(n>2, binomial(n, k)-binomial(n-2, k-1), 1) \\ M. F. Hasler, Jan 06 2024
  • Sage
    def T(n,k): return 1 if n<3 else binomial(n,k) - binomial(n-2,k-1)
    flatten([[T(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Apr 28 2021
    

Formula

T(n, k) = C(n,k) - C(n-2,k-1) for n >= 3 and T(n, k) = 1 otherwise.
T(n, k) = T(n-1, k-1) + T(n-1, k) starting with T(2, 0) = T(2, 1) = T(2, 2) = 1 and T(n, 0) = T(n, n) = 1.
G.f.: (1-x^2*y) / (1 - x*(1+y)). - Ralf Stephan, Jan 31 2005
From G. C. Greubel, Apr 28 2021: (Start)
Sum_{k=0..n} T(n, k) = (n+1)*[n<3] + 3*2^(n-2)*[n>=3].
T(n, k, q) = q*[n=2] + Sum_{j=0..5} q^j*binomial(n-2*j, k-j)*[n>2*j] with T(n,0) = T(n,n) = 1 for q = -1. (End)

A066629 a(n) = 2*Fibonacci(n+2) + ((-1)^n - 3)/2.

Original entry on oeis.org

1, 2, 5, 8, 15, 24, 41, 66, 109, 176, 287, 464, 753, 1218, 1973, 3192, 5167, 8360, 13529, 21890, 35421, 57312, 92735, 150048, 242785, 392834, 635621, 1028456, 1664079, 2692536, 4356617, 7049154, 11405773, 18454928, 29860703, 48315632, 78176337, 126491970, 204668309
Offset: 0

Views

Author

Miklos Kristof, Dec 18 2002

Keywords

Comments

Fibonacci-like numbers made from Asher Auel's triangle A(n,m) (A051597) satisfying A(0,0)=1, A(1,0)=2, A(1,1)=2, etc..: then a(0)=1, a(1)=2, a(n) = A(n,0) + A(n-1,1) + A(n-2,2) + ...
Equals row sums of triangle A153864. - Gary W. Adamson, Jan 03 2009

Examples

			a(5) = A(5,0) + A(4,1) + A(3,2) = 6 + 11 + 7 = 24.
		

Crossrefs

Cf. A051597.
Cf. A153864. - Gary W. Adamson, Jan 03 2009

Programs

  • Maple
    A066629 := proc(n)
        2*combinat[fibonacci](n+2)+((-1)^n-3)/2 ;
    end proc:
    seq(A066629(n),n=0..10) ; # R. J. Mathar, Apr 13 2016
  • Mathematica
    Join[{b=1},a=0;Table[If[OddQ[a]&&EvenQ[b],c=a+b+2,c=a+b+1];a=b;b=c,{n,0,5!}]] (* Vladimir Joseph Stephan Orlovsky, Jan 10 2011 *)
    Table[2Fibonacci[n+2]+((-1)^n-3)/2,{n,0,40}] (* or *) LinearRecurrence[ {1,2,-1,-1},{1,2,5,8},41] (* Harvey P. Dale, Oct 09 2011 *)
  • PARI
    a(n) = { 2*fibonacci(n+2) + ((-1)^n - 3)/2 } \\ Harry J. Smith, Mar 14 2010
    
  • Python
    from sympy import fibonacci
    def A066629(n): return (fibonacci(n+2)<<1)-1-(n&1) # Chai Wah Wu, May 05 2025

Formula

Lim_{n->oo} a(n)/a(n-1) = (1+sqrt(5))/2. If n is even: a(n) = a(n-1) + a(n-2) + 2; if n is odd: a(n) = a(n-1) + a(n-2) + 1.
G.f.: (1+x+x^2)/((1-x-x^2)(1-x)(1+x)). - R. J. Mathar, Sep 19 2008
a(0)=1, a(1)=2, a(2)=5, a(3)=8, a(n) = a(n-1)+2*a(n-2)-a(n-3)-a(n-4). - Harvey P. Dale, Oct 09 2011

A134636 Triangle formed by Pascal's rule given borders = 2n+1.

Original entry on oeis.org

1, 3, 3, 5, 6, 5, 7, 11, 11, 7, 9, 18, 22, 18, 9, 11, 27, 40, 40, 27, 11, 13, 38, 67, 80, 67, 38, 13, 15, 51, 105, 147, 147, 105, 51, 15, 17, 66, 156, 252, 294, 252, 156, 66, 17, 19, 83, 222, 408, 546, 546, 408, 222, 83, 19, 21, 102, 305, 630, 954, 1092, 954, 630, 305, 102, 21
Offset: 0

Views

Author

Gary W. Adamson, Nov 04 2007

Keywords

Comments

Row sums = A048487: (1, 6, 16, 36, 76, 156, ...).

Examples

			First few rows of the triangle:
   1;
   3,  3;
   5,  6,  5;
   7, 11, 11,  7;
   9, 18, 22, 18,  9;
  11, 27, 40, 40, 27, 11;
  13, 38, 67, 80, 67, 38, 13;
  ...
		

Crossrefs

Programs

  • Haskell
    a134636 n k = a134636_tabl !! n !! k
    a134636_row n = a134636_tabl !! n
    a134636_tabl = iterate (\row -> zipWith (+) ([2] ++ row) (row ++ [2])) [1]
    -- Reinhard Zumkeller, Nov 23 2012
  • Maple
    T:= proc(n,k) option remember;
          `if`(k<0 or k>n, 0,
          `if`(k=0 or k=n, 2*n+1,
             T(n-1, k-1) + T(n-1, k) ))
        end:
    seq(seq(T(n, k), k=0..n), n=0..14);  # Alois P. Heinz, May 26 2013
  • Mathematica
    NestList[Append[Prepend[Map[Apply[Plus, #] &, Partition[#, 2, 1]], #[[1]] + 2], #[[1]] + 2] &, {1}, 10] // Grid  (* Geoffrey Critzer, May 26 2013 *)
    T[n_, k_] := Binomial[n, k-1] + Binomial[n, k] + 2 Binomial[n, k+1] + Binomial[n, n-k+1];
    Table[T[n, k], {n, 0, 14}, {k, 0, n}] // Flatten (* Jean-François Alcover, Mar 07 2021 *)

Formula

Triangle, given borders = (1, 3, 5, 7, 9, ...); apply Pascal's rule T(n,k) = T(n-1,k) P T(n-1,k-1).
T(n,k) = A051601(n,k) + A051597(n,k); T(n,k) mod 2 = A047999(n,k). - Reinhard Zumkeller, Nov 23 2012
Closed-form formula for arbitrary left and right borders of Pascal like triangle see A228196. - Boris Putievskiy, Aug 19 2013

Extensions

Offset changed by Reinhard Zumkeller, Nov 23 2012

A080046 Multiplicative Pascal triangle, read by rows: T(n,1)=T(n,n)=n and T(n,k) = T(n-1,k-1) * T(n-1,k).

Original entry on oeis.org

1, 2, 2, 3, 4, 3, 4, 12, 12, 4, 5, 48, 144, 48, 5, 6, 240, 6912, 6912, 240, 6, 7, 1440, 1658880, 47775744, 1658880, 1440, 7, 8, 10080, 2388787200, 79254226206720, 79254226206720, 2388787200, 10080, 8, 9, 80640, 24078974976000
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 21 2003

Keywords

Comments

T(n,2) = A052849(n) for n>1.

Examples

			1
2  2
3  4  3
4 12 12 4
		

Crossrefs

Programs

  • Haskell
    a080046 n k = a080046_tabl !! (n-1) !! (k-1)
    a080046_row n = a080046_tabl !! (n-1)
    a080046_tabl = iterate f [1] where
       f (x:xs) = [x + 1] ++ (zipWith (*) xs $ reverse xs) ++ [x + 1]
    -- Reinhard Zumkeller, Oct 27 2013

Extensions

Corrected by André F. Labossière, Sep 27 2004

A209561 Triangle of coefficients of polynomials u(n,x) jointly generated with A209562; see the Formula section.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 3, 4, 3, 1, 4, 7, 7, 4, 1, 5, 11, 14, 11, 5, 1, 6, 16, 25, 25, 16, 6, 1, 7, 22, 41, 50, 41, 22, 7, 1, 8, 29, 63, 91, 91, 63, 29, 8, 1, 9, 37, 92, 154, 182, 154, 92, 37, 9, 1, 10, 46, 129, 246, 336, 336, 246, 129, 46, 10, 1, 11, 56, 175, 375, 582, 672
Offset: 1

Views

Author

Clark Kimberling, Mar 10 2012

Keywords

Comments

Alternating row sums: 1,0,1,1,1,1,1,1,1,1,1,1,1,1,...
For a discussion and guide to related arrays, see A208510.

Examples

			First five rows:
1
1...1
2...2...1
3...4...3...1
4...7...7...4...1
First three polynomials v(n,x): 1, 1 + x, 2 + 2x + x^2.
		

Crossrefs

Cf. A083329 (row sums), A097613 (central terms).

Programs

  • Haskell
    a209561 n k = a209561_tabl !! (n-1) !! (k-1)
    a209561_row n = a209561_tabl !! (n-1)
    a209561_tabl = [1] : iterate
                   (\row -> zipWith (+) ([1] ++ row) (row ++ [0])) [1,1]
    -- Reinhard Zumkeller, Dec 26 2012
  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := x*u[n - 1, x] + v[n - 1, x];
    v[n_, x_] := x*u[n - 1, x] + v[n - 1, x] + 1;
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]   (* A209561 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]   (* A209562 *)

Formula

u(n,x)=x*u(n-1,x)+v(n-1,x),
v(n,x)=x*u(n-1,x)+v(n-1,x) +1,
where u(1,x)=1, v(1,x)=1.
T(n,n) = 1; T(n,k) = A051597(n-2,k-1), 1 <= k < n. - Reinhard Zumkeller, Dec 26 2012

A075779 Triangle T(n,k) = f(n,k,n-1), n >= 2, 1 <= k <= n-1, where f is given below.

Original entry on oeis.org

2, 6, 6, 12, 16, 12, 20, 35, 35, 20, 30, 66, 84, 66, 30, 42, 112, 175, 175, 112, 42, 56, 176, 328, 400, 328, 176, 56, 72, 261, 567, 819, 819, 567, 261, 72, 90, 370, 920, 1540, 1820, 1540, 920, 370, 90, 110, 506, 1419, 2706, 3696, 3696, 2706, 1419, 506, 110, 132, 672
Offset: 2

Views

Author

N. J. A. Sloane, Oct 17 2002

Keywords

Comments

Row sums give sequence A033484(n)*(n+2). Essentially same triangle as A051597(n,k)*(n+2). - Philippe Deléham, Oct 01 2003

Examples

			2; 6,6; 12,16,12; 20,35,35,20; ...
		

Crossrefs

Cf. A014410 and A007318 for f(n, k, n), A075779 and A075798 for f(n, k, n-1) and A075780 and A075837 for f(n, k, n-2).

Programs

  • Maple
    f := proc(n,p,k) convert( binomial(n,k)*hypergeom([1-k,-p,p-n],[1-n,1],1), `StandardFunctions`); end;
  • Mathematica
    t[n_, k_] := n*HypergeometricPFQ[{-k, 2-n, k-n}, {1, 1-n}, 1]; Table[t[n, k], {n, 2, 12}, {k, 1, n-1}] // Flatten (* Jean-François Alcover, Jan 14 2014 *)

Formula

f(n, p, k) = binomial(n, k)*hypergeom([1-k, -p, p-n], [1-n, 1], 1).
Showing 1-10 of 14 results. Next