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 21-30 of 205 results. Next

A004070 Table of Whitney numbers W(n,k) read by antidiagonals, where W(n,k) is maximal number of pieces into which n-space is sliced by k hyperplanes, n >= 0, k >= 0.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 4, 4, 1, 1, 2, 4, 7, 5, 1, 1, 2, 4, 8, 11, 6, 1, 1, 2, 4, 8, 15, 16, 7, 1, 1, 2, 4, 8, 16, 26, 22, 8, 1, 1, 2, 4, 8, 16, 31, 42, 29, 9, 1, 1, 2, 4, 8, 16, 32, 57, 64, 37, 10, 1, 1, 2, 4, 8, 16, 32, 63, 99, 93, 46, 11, 1, 1, 2, 4, 8, 16, 32, 64, 120, 163
Offset: 0

Views

Author

Keywords

Comments

As a number triangle, this is given by T(n,k)=sum{j=0..n, C(n,j)(-1)^(n-j)sum{i=0..j, C(j+k,i-k)}}. - Paul Barry, Aug 23 2004
As a number triangle, this is the Riordan array (1/(1-x), x(1+x)) with T(n,k)=sum{i=0..n, binomial(k,i-k)}. Diagonal sums are then A023434(n+1). - Paul Barry, Feb 16 2005
Form partial sums across rows of square array of binomial coefficients A026729; see also A008949. - Philippe Deléham, Aug 28 2005
Square array A026729 -> Partial sums across rows
1 0 0 0 0 0 0 . . . . 1 1 1 1 1 1 1 . . . . . .
1 1 0 0 0 0 0 . . . . 1 2 2 2 2 2 2 . . . . . .
1 2 1 0 0 0 0 . . . . 1 3 4 4 4 4 4 . . . . . .
1 3 3 1 0 0 0 . . . . 1 4 7 8 8 8 8 . . . . . .
For other Whitney numbers see A007799.
W(n,k) is the number of length k binary sequences containing no more than n 1's. - Geoffrey Critzer, Mar 15 2010
From Emeric Deutsch, Jun 15 2010: (Start)
Viewed as a number triangle, T(n,k) is the number of internal nodes of the Fibonacci tree of order n+2 at level k. A Fibonacci tree of order n (n>=2) is a complete binary tree whose left subtree is the Fibonacci tree of order n-1 and whose right subtree is the Fibonacci tree of order n-2; each of the Fibonacci trees of order 0 and 1 is defined as a single node.
(End)
Named after the American mathematician Hassler Whitney (1907-1989). - Amiram Eldar, Jun 13 2021

Examples

			Table W(n,k) begins:
  1 1 1 1  1  1  1 ...
  1 2 3 4  5  6  7 ...
  1 2 4 7 11 16 22 ...
  1 2 4 8 15 26 42 ...
W(2,4) = 11 because there are 11 length 4 binary sequences containing no more than 2 1's: {0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 0}, {0, 0, 1, 1}, {0, 1, 0, 0}, {0, 1, 0, 1}, {0, 1, 1, 0}, {1, 0, 0, 0}, {1, 0, 0, 1}, {1, 0, 1, 0}, {1, 1, 0, 0}. - _Geoffrey Critzer_, Mar 15 2010
Table T(n, k) begins:
  1
  1  1
  1  2  1
  1  2  3  1
  1  2  4  4  1
  1  2  4  7  5  1
  1  2  4  8 11  6  1
...
		

References

  • Donald E. Knuth, The Art of Computer Programming, Vol. 3, 2nd edition, Addison-Wesley, Reading, MA, 1998, p. 417.

Crossrefs

Cf. A007799. As a triangle, mirror A052509.
Rows converge to powers of two (A000079). Subdiagonals include A000225, A000295, A002662, A002663, A002664, A035038, A035039, A035040, A035041, A035042. Antidiagonal sums are A000071.

Programs

  • Mathematica
    Transpose[ Table[Table[Sum[Binomial[n, k], {k, 0, m}], {m, 0, 15}], {n, 0, 15}]] // Grid (* Geoffrey Critzer, Mar 15 2010 *)
    T[ n_, k_] := Sum[ Binomial[n, j] (-1)^(n - j) Sum[ Binomial[j + k, i - k], {i, 0, j}], {j, 0, n}]; (* Michael Somos, May 31 2016 *)
  • PARI
    /* array read by antidiagonals up coordinate index functions */
    t1(n) = binomial(floor(3/2 + sqrt(2+2*n)), 2) - (n+1); /* A025581 */
    t2(n) = n - binomial(floor(1/2 + sqrt(2+2*n)), 2); /* A002262 */
    /* define the sequence array function for A004070 */
    W(n, k) = sum(i=0, n, binomial(k, i));
    /* visual check ( origin 0,0 ) */
    printp(matrix(7, 7, n, k, W(n-1, k-1)));
    /* print the sequence entries by antidiagonals going up ( origin 0,0 ) */
    print1("S A004070 "); for(n=0, 32, print1(W(t1(n), t2(n))","));
    print1("T A004070 "); for(n=33, 61, print1(W(t1(n), t2(n))","));
    print1("U A004070 "); for(n=62, 86, print1(W(t1(n), t2(n))",")); /* Michael Somos, Apr 28 2000 */
    
  • PARI
    T(n, k)=sum(m=0, n-k, binomial(k, m)) \\ Jianing Song, May 30 2022

Formula

W(n, k) = Sum_{i=0..n} binomial(k, i). - Bill Gosper
W(n, k) = if k=0 or n=0 then 1 else W(n, k-1)+W(n-1, k-1). - David Broadhurst, Jan 05 2000
The table W(n,k) = A000012 * A007318(transform), where A000012 = (1; 1,1; 1,1,1; ...). - Gary W. Adamson, Nov 15 2007
E.g.f. for row n: (1 + x + x^2/2! + ... + x^n/n!)* exp(x). - Geoffrey Critzer, Mar 15 2010
G.f.: 1 / (1 - x - x*y*(1 - x^2)) = Sum_{0 <= k <= n} x^n * y^k * T(n, k). - Michael Somos, May 31 2016
W(n, n) = 2^n. - Michael Somos, May 31 2016
From Jianing Song, May 30 2022: (Start)
T(n, 0) = T(n, n) = 1 for n >= 0; T(n, k) = T(n-1, k-1) + T(n-2, k-1) for k=1, 2, ..., n-1, n >= 2.
T(n, k) = Sum_{m=0..n-k} binomial(k, m).
T(n,k) = 2^k for 0 <= k <= floor(n/2). (End)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Mar 20 2000

A002663 a(n) = 2^n - C(n,0) - C(n,1) - C(n,2) - C(n,3).

Original entry on oeis.org

0, 0, 0, 0, 1, 6, 22, 64, 163, 382, 848, 1816, 3797, 7814, 15914, 32192, 64839, 130238, 261156, 523128, 1047225, 2095590, 4192510, 8386560, 16774891, 33551806, 67105912, 134214424, 268431773, 536866822, 1073737298
Offset: 0

Views

Author

Keywords

Comments

Starting with "1" = eigensequence of a triangle with bin(n,4), A000332 as the left border: (1, 5, 15, 35, 70, ...) and the rest 1's. - Gary W. Adamson, Jul 24 2010
The Kn25 sums, see A180662, of triangle A065941 equal the terms (doubled) of this sequence minus the four leading zeros. - Johannes W. Meijer, Aug 14 2011
(1 + 6x + 22x^2 + 64x^3 + ...) = (1 + 3x + 6x^2 + 10x^3 + ...) * (1 + 3x + 7x^2 + 15x^3 + ...). - Gary W. Adamson, Mar 14 2012
The sequence starting (1, 6, 22, ...) is the binomial transform of A171418 and starting (0, 0, 0, 1, 6, 22, ...) is the binomial transform of (0, 0, 0, 1, 2, 2, 2, 2, 2, ...). - Gary W. Adamson, Jul 27 2015
Number of binary sequences with at least four 0's. - Enrique Navarrete, Jul 23 2025

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n)= A055248(n, 4). Partial sums of A002662.

Programs

  • Haskell
    a002663 n = a002663_list !! n
    a002663_list = map (sum . drop 4) a007318_tabl
    -- Reinhard Zumkeller, Jun 20 2015
    
  • Magma
    [2^n - Binomial(n,0)- Binomial(n,1) - Binomial(n,2) - Binomial(n,3): n in [0..35]]; // Vincenzo Librandi, May 20 2011
    
  • Maple
    A002663 := proc(n): 2^n - add(binomial(n,k),k=0..3) end: seq(A002663(n), n=0..30); # Johannes W. Meijer, Aug 14 2011
  • Mathematica
    a=1;lst={};s1=s2=s3=s4=0;Do[s1+=a;s2+=s1;s3+=s2;s4+=s3;AppendTo[lst,s4];a=a*2,{n,5!}];lst (* Vladimir Joseph Stephan Orlovsky, Jan 10 2009 *)
    Table[Sum[ Binomial[n + 4, k + 4], {k, 0, n}], {n, -4, 26}] (* Zerinvary Lajos, Jul 08 2009 *)
  • PARI
    a(n)=(6*2^n-n^3-5*n-6)/6 \\ Charles R Greathouse IV, Sep 24 2015

Formula

a(n) = 2^n - A000125(n).
G.f.: x^4/((1-2*x)*(1-x)^4). - Simon Plouffe in his 1992 dissertation
a(n) = Sum_{k=0..n} binomial(n,k+4) = Sum_{k=4..n} binomial(n,k). - Paul Barry, Aug 23 2004
a(n) = 2*a(n-1) + binomial(n-1,3). - Paul Barry, Aug 23 2004
a(n) = (6*2^n - n^3 - 5*n - 6)/6. - Mats Granvik, Gary W. Adamson, Feb 17 2010
From Enrique Navarrete, Jul 23 2025: (Start)
a(n) = 6*a(n-1) - 14*a(n-2) + 16*a(n-3) - 9*a(n-4) + 2*a(n-5).
E.g.f.: exp(x)*(exp(x) - 1 - x - x^2/2 - x^3/6). (End)

A050488 a(n) = 3*(2^n-1) - 2*n.

Original entry on oeis.org

0, 1, 5, 15, 37, 83, 177, 367, 749, 1515, 3049, 6119, 12261, 24547, 49121, 98271, 196573, 393179, 786393, 1572823, 3145685, 6291411, 12582865, 25165775, 50331597, 100663243, 201326537, 402653127, 805306309, 1610612675, 3221225409, 6442450879, 12884901821, 25769803707
Offset: 0

Views

Author

James Sellers, Dec 26 1999

Keywords

Comments

Number of words of length n+1 where first element is from {0,1,2}, other elements are from {0,1} and sequence does not decrease (for n=2 there are 3*2^2 sequences, but 000, 100, 110, 111, 200, 210, 211 decrease, so a(2) = 12-7 = 5).
Number of subgroups of C_(2^n) X C_(2^n) (see A060724).
Starting with 1 = row sums of triangle A054582. - Gary W. Adamson, Jun 23 2008
Starting with "1" equals the eigensequence of a triangle with integer squares (1, 4, 9, 16, ...) as the left border and the rest 1's. - Gary W. Adamson, Jul 24 2010
(1 + 2x + 2x^2 + 2x^3 + ...)*(1 + 3x + 7x^2 + 15x^3 + ...) = (1 + 5x + 15x^2 + 37x^3 + ...). - Gary W. Adamson, Mar 14 2012
The partial sums of A033484. - J. M. Bergot, Oct 03 2012
Binomial transform is 0, 1, 7, 33, ... (shifted A066810); inverse binomial transform is 0, 1, 3, 3, ... (3 repeated). - R. J. Mathar, Oct 05 2012
Define a triangle by T(n,0) = n*(n+1) + 1, T(n,n) = n + 1, and T(r,c) = T(r-1,c-1) + T(r-1,c) otherwise; then a(n+1) is the sum of the terms of row n. - J. M. Bergot, Mar 30 2013
Starting with "1" are also the antidiagonal sums of the array formed by partial sums of integer squares (1, 4, 9, 16, ...). - Luciano Ancora, Apr 24 2015
Sums of 2 adjacent terms in diagonal k=2 of Eulerian triangle A008292. I.e., T(n,2)+T(n-1,2) for n > 0. Also, 4th NW-SE diagonal of A126277. In other words, a(n) = A000295(n) + A000295(n+1). - Gregory Gerard Wojnar, Sep 30 2018

Crossrefs

Programs

  • GAP
    List([0..30],n->3*(2^n-1)-2*n); # Muniru A Asiru, Oct 26 2018
    
  • Haskell
    a050488 n = sum $ zipWith (*) a000079_list (reverse $ take n a005408_list)
    -- Reinhard Zumkeller, Jul 24 2015
    
  • Magma
    [3*(2^n-1) - 2*n: n in [0..30]]; // G. C. Greubel, Oct 23 2018
    
  • Maple
    seq(coeff(series(x*(x+1)/((1-x)^2*(1-2*x)),x,n+1), x, n), n = 0 .. 30); # Muniru A Asiru, Oct 26 2018
  • Mathematica
    Table[3(2^n-1)-2n,{n,0,30}] (* or *) LinearRecurrence[{4,-5,2}, {0,1,5}, 40] (* Harvey P. Dale, Apr 09 2018 *)
  • PARI
    a(n)=3*(2^n-1)-2*n \\ Charles R Greathouse IV, Sep 24 2015
    
  • Python
    for n in range(0, 30): print(3*(2**n-1) - 2*n, end=', ') # Stefano Spezia, Oct 27 2018

Formula

Row sums of A125165: (1, 5, 15, 37, ...). Binomial transform of [1, 4, 6, 6, 6, ...] = [1, 5, 15, 37, ...]. 4th diagonal from the right of A126777 = (1, 5, 15, ...). - Gary W. Adamson, Dec 23 2006
a(n) = 2*a(n-1) + (2n-1). - Gary W. Adamson, Sep 30 2007
From Johannes W. Meijer, Feb 20 2009: (Start)
a(n+1) = A156920(n+1,1).
a(n+1) = A156919(n+1,1)/2^n.
a(n+1) = A142963(n+2,1)/2.
a(n) = 4a(n-1) - 5a(n-2) + 2a(n-3) for n>2 with a(0) = 0, a(1) = 1, a(2) = 5.
G.f.: z*(1+z)/((1-z)^2*(1-2*z)).
(End)
a(n) = 2*n + 2*a(n-1) - 1 (with a(0)=0). - Vincenzo Librandi, Aug 06 2010
a(n+1) = Sum_{k=0..n} A000079(k) * A005408(n-k), convolution of the powers of 2 with the odd numbers. - Reinhard Zumkeller, Mar 08 2012
E.g.f.: exp(x)*(3*exp(x) - 2*x - 3). - Stefano Spezia, May 15 2023

A177510 Number of compositions (p0, p1, p2, ...) of n with pi - p0 <= i and pi >= p0.

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 14, 25, 46, 87, 167, 324, 634, 1248, 2466, 4887, 9706, 19308, 38455, 76659, 152925, 305232, 609488, 1217429, 2432399, 4860881, 9715511, 19421029, 38826059, 77626471, 155211785, 310357462, 620608652, 1241046343, 2481817484, 4963191718, 9925669171, 19850186856, 39698516655, 79394037319
Offset: 0

Views

Author

Mats Granvik, Dec 11 2010

Keywords

Comments

a(0)=1, otherwise row sums of A179748.
For n>=1 cumulative sums of A008930.
a(n) is proportional to A048651*A000079. The error (a(n)-A048651*A000079) divided by sequence A186425 tends to the golden ratio A001622. This can be seen when using about 1000 decimals of the constant A048651 = 0.2887880950866024212... - [Mats Granvik, Jan 01 2015]
From Gus Wiseman, Mar 31 2022: (Start)
Also the number of integer compositions of n with exactly one part on or above the diagonal. For example, the a(1) = 1 through a(5) = 8 compositions are:
(1) (2) (3) (4) (5)
(11) (21) (31) (41)
(111) (112) (212)
(211) (311)
(1111) (1112)
(1121)
(2111)
(11111)
(End)

Examples

			From _Joerg Arndt_, Mar 24 2014: (Start)
The a(7) = 25 such compositions are:
01:  [ 1 1 1 1 1 1 1 ]
02:  [ 1 1 1 1 1 2 ]
03:  [ 1 1 1 1 2 1 ]
04:  [ 1 1 1 1 3 ]
05:  [ 1 1 1 2 1 1 ]
06:  [ 1 1 1 2 2 ]
07:  [ 1 1 1 3 1 ]
08:  [ 1 1 1 4 ]
09:  [ 1 1 2 1 1 1 ]
10:  [ 1 1 2 1 2 ]
11:  [ 1 1 2 2 1 ]
12:  [ 1 1 2 3 ]
13:  [ 1 1 3 1 1 ]
14:  [ 1 1 3 2 ]
15:  [ 1 2 1 1 1 1 ]
16:  [ 1 2 1 1 2 ]
17:  [ 1 2 1 2 1 ]
18:  [ 1 2 1 3 ]
19:  [ 1 2 2 1 1 ]
20:  [ 1 2 2 2 ]
21:  [ 1 2 3 1 ]
22:  [ 2 2 3 ]
23:  [ 2 3 2 ]
24:  [ 3 4 ]
25:  [ 7 ]
(End)
		

Crossrefs

Cf. A238859 (compositions with subdiagonal growth), A238876 (partitions with subdiagonal growth), A001227 (partitions into distinct parts with subdiagonal growth).
Cf. A238860 (partitions with superdiagonal growth), A238861 (compositions with superdiagonal growth), A000009 (partitions into distinct parts have superdiagonal growth by definition).
The version for partitions is A001477, strong A002620.
The version for permutations is A057427, strong A000295.
The opposite version is A238874, first column of A352522.
The version for fixed points is A240736, nonfixed A352520.
The strong version is A351983, column k=1 of A352524.
This is column k = 1 of A352525.
A238349 counts compositions by fixed points, first col A238351.
A352517 counts weak excedances of standard compositions.

Programs

  • Maple
    A179748 := proc(n,k) option remember; if k= 1 then 1; elif k> n then 0 ; else add( procname(n-i,k-1),i=1..k-1) ; end if; end proc:
    A177510 := proc(n) add(A179748(n,k),k=1..n) ;end proc:
    seq(A177510(n),n=1..20) ; # R. J. Mathar, Dec 14 2010
  • Mathematica
    Clear[t, nn]; nn = 39; t[n_, 1] = 1; t[n_, k_] := t[n, k] = If[n >= k, Sum[t[n - i, k - 1], {i, 1, k - 1}], 0]; Table[Sum[t[n, k], {k, 1, n}], {n, 1, nn}] (* Mats Granvik, Jan 01 2015 *)
    pdw[y_]:=Length[Select[Range[Length[y]],#<=y[[#]]&]]; Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],pdw[#]==1&]],{n,0,10}] (* Gus Wiseman, Mar 31 2022 *)
  • PARI
    N=66; q='q+O('q^N); Vec( 1 + q/(1-q) * sum(n=0, N, q^n * prod(k=1, n, (1-q^k)/(1-q) ) ) ) \\ Joerg Arndt, Mar 24 2014
  • Sage
    @CachedFunction
    def T(n, k): # A179748
        if n == 0:  return int(k==0);
        if k == 1:  return int(n>=1);
        return sum( T(n-i, k-1) for i in [1..k-1] );
    # to display triangle A179748 including column zero = [1,0,0,0,...]:
    #for n in [0..10]: print([ T(n,k) for k in [0..n] ])
    def a(n): return sum( T(n,k) for k in [0..n] )
    print([a(n) for n in [0..66]])
    # Joerg Arndt, Mar 24 2014
    

Formula

G.f.: 1 + q/(1-q) * sum(n>=0, q^n * prod(k=1..n, (1-q^k)/(1-q) ) ). [Joerg Arndt, Mar 24 2014]

Extensions

New name and a(0) = 1 prepended, Joerg Arndt, Mar 24 2014

A109128 Triangle read by rows: T(n,k) = T(n-1,k-1) + T(n-1,k) + 1 for 0

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 5, 5, 1, 1, 7, 11, 7, 1, 1, 9, 19, 19, 9, 1, 1, 11, 29, 39, 29, 11, 1, 1, 13, 41, 69, 69, 41, 13, 1, 1, 15, 55, 111, 139, 111, 55, 15, 1, 1, 17, 71, 167, 251, 251, 167, 71, 17, 1, 1, 19, 89, 239, 419, 503, 419, 239, 89, 19, 1, 1, 21, 109, 329, 659, 923, 923, 659, 329, 109, 21, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 20 2005

Keywords

Comments

Eigensequence of the triangle = A001861. - Gary W. Adamson, Apr 17 2009

Examples

			Triangle begins as:
  1;
  1   1;
  1   3   1;
  1   5   5   1;
  1   7  11   7   1;
  1   9  19  19   9   1;
  1  11  29  39  29  11   1;
  1  13  41  69  69  41  13   1;
  1  15  55 111 139 111  55  15   1;
  1  17  71 167 251 251 167  71  17   1;
  1  19  89 239 419 503 419 239  89  19   1;
		

Crossrefs

Cf. A000325 (row sums).
Sequence m*binomial(n,k) - (m-1): A007318 (m=1), this sequence (m=2), A131060 (m=3), A131061 (m=4), A131063 (m=5), A131065 (m=6), A131067 (m=7), A168625 (m=8).

Programs

  • Haskell
    a109128 n k = a109128_tabl !! n !! k
    a109128_row n = a109128_tabl !! n
    a109128_tabl = iterate (\row -> zipWith (+)
       ([0] ++ row) (1 : (map (+ 1) $ tail row) ++ [0])) [1]
    -- Reinhard Zumkeller, Apr 10 2012
    
  • Magma
    [2*Binomial(n,k) -1: k in [0..n], n in [0..12]]; // G. C. Greubel, Mar 12 2020
    
  • Maple
    A109128 := proc(n,k)
        2*binomial(n,k)-1 ;
    end proc: # R. J. Mathar, Jul 12 2016
  • Mathematica
    Table[2*Binomial[n,k] -1, {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Mar 12 2020 *)
  • Sage
    [[2*binomial(n,k) -1 for k in (0..n)] for n in (0..12)] # G. C. Greubel, Mar 12 2020

Formula

T(n,k) = T(n-1,k-1) + T(n-1,k) + 1 with T(n,0) = T(n,n) = 1.
Sum_{k=0..n} T(n, k) = A000325(n+1) (row sums).
T(n, k) = 2*binomial(n,k) - 1. - David W. Cantrell (DWCantrell(AT)sigmaxi.net), Sep 30 2007
T(n, 1) = 2*n - 1 = A005408(n+1) for n>0.
T(n, 2) = n^2 + n - 1 = A028387(n-2) for n>1.
T(n, k) = Sum_{j=0..n-k} C(n-k,j)*C(k,j)*(2 - 0^j) for k <= n. - Paul Barry, Apr 27 2006
T(n,k) = A014473(n,k) + A007318(n,k), 0 <= k <= n. - Reinhard Zumkeller, Apr 10 2012
From G. C. Greubel, Apr 06 2024: (Start)
T(n, n-k) = T(n, k).
T(2*n, n) = A134760(n).
T(2*n-1, n) = A030662(n), for n >= 1.
Sum_{k=0..n-1} T(n, k) = A000295(n+1), for n >= 1.
Sum_{k=0..n} (-1)^k*T(n, k) = 2*[n=0] - A000035(n+1).
Sum_{k=0..n-1} (-1)^k*T(n, k) = A327767(n), for n >= 1.
Sum_{k=0..floor(n/2)} T(n-k, k) = A281362(n).
Sum_{k=0..floor((n-1)/2)} T(n-k, k) = A281362(n-1) - (1+(-1)^n)/2 for n >= 1.
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = b(n), where b(n) is the repeating pattern {1,1,0,-2,-3,-1,2,2,-1,-3,-2,0} with b(n) = b(n-12). (End)

Extensions

Offset corrected by Reinhard Zumkeller, Apr 10 2012

A000247 a(n) = 2^n - n - 2.

Original entry on oeis.org

0, 3, 10, 25, 56, 119, 246, 501, 1012, 2035, 4082, 8177, 16368, 32751, 65518, 131053, 262124, 524267, 1048554, 2097129, 4194280, 8388583, 16777190, 33554405, 67108836, 134217699, 268435426, 536870881, 1073741792, 2147483615
Offset: 2

Views

Author

Keywords

Comments

Ways of placing n+1 labeled balls into 2 indistinguishable boxes with at least 2 balls in each box.
2^a(n) is an integer of the form 1/(2 - Sum_{i=1..m} i/2^i). - Benoit Cloitre, Oct 25 2002
Number of permutations avoiding 13-2 that contain the pattern 23-1 exactly twice.
Cost of ternary maximum height Huffman tree with N internal nodes (non-leaves) for minimizing absolutely ordered sequences of size n = 2N + 1. - Alex Vinokur (alexvn(AT)barak-online.net), Nov 02 2004
a(n) is the number of Dyck n-paths whose third upstep initiates the last long ascent, n >= 1. A long ascent is one consisting of 2 or more upsteps. For example, a(3)=3 counts UUDuUDDD, UDUDuUDD, UUDDuUDD (third upstep in small type). - David Callan, Dec 08 2004
Subsequence of A158581; A000120(a(n)) > 1. - Reinhard Zumkeller, Apr 16 2009
Number of vertices of the tropical Grassmannian simplicial complex G(2,n), related to phylogenetic trees. - Tom Copeland, Oct 03 2011
(Conjecture) Let a(2)=0. For n > 2, let N = 2*n + 1. For each n, define the n X n tridiagonal unit-primitive matrix (see [Jeffery]) A_{N,1}=[0,1,0,...,0; 1,0,1,0,...,0; 0,1,0,1,0,...,0; ...; 0,...,0,1,0,1; 0,...,0,1,1] associated with N. Define the n-dimensional column vectors V_N = [v_1,v_2,...,v_n]^T = [A_{N,1}]^n*[1,1,...,1]^T, where [.]^T denotes matrix transpose and [1,...,1] is the n-dimensional unit vector. Let (v_k)N denote the k-th element of V_N, k in {1,...,n}. Then a(n) = (v(n-2))N. - _L. Edson Jeffery, Jan 20 2012
For n>0, (a(n)) is row 3 of the convolution array A213568. - Clark Kimberling, Jun 20 2012
For n>2, a(n-2) is the number of connected induced (non-null) subgraphs of the n-centipede graph. - Giovanni Resta, May 04 2017
a(n) is the number of maximal boundary strata of the moduli space of stable rational curves with n+1 marked points. The closures of the maximal boundary strata are called the irreducible boundary divisors of the moduli space; see Cavalieri Section 2.1. - Harry Richman, Aug 13 2024

Examples

			a(3) = 4!/(2!*2!*2!) = 3.
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 222.
  • F. N. David and D. E. Barton, Combinatorial Chance. Hafner, NY, 1962, p. 296.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 76.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000478 (3 boxes), A058844 (4 boxes).

Programs

Formula

E.g.f.: (exp(x)-1-x)*(exp(x)-1).
G.f.: x^3*(3-2*x)/((1-2*x)*(1-x)^2).
a(n) = 2*a(n-1) + n + 3 = a(n-1) + 2^(n-1) - 1 = A000295(n) - 1 = A000295(n+1) - 2^(n+1).
A107907(a(n)) = A000225(n). - Reinhard Zumkeller, May 28 2005
Starting (3, 10, 25, 56, ...) = binomial transform of [3, 7, 8, 8, 8, ...]. - Gary W. Adamson, Nov 07 2007
a(2)=0, a(3)=3, a(4)=10, a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3). - Harvey P. Dale, Aug 23 2011
a(n) = (Sum_{k=2..floor(n/2)} binomial(n+1,k)) + if(n odd, binomial(n+1,(n+1)/2)/2, 0).
a(n) = Sum_{k=0..n-3} Sum_{i=0..n-1} C(i,k). - Wesley Ivan Hurt, Sep 20 2017

Extensions

Additional comments from Michael Steyer, Dec 02 2000
More terms from Larry Reeves (larryr(AT)acm.org), Dec 04 2000
I recently changed the beginning of this sequence so the formulas etc. may need to be adjusted. - N. J. A. Sloane, Jan 24 2006
Formulas and comments adjusted for offset by Franklin T. Adams-Watters, Nov 10 2011

A104712 Pascal's triangle, with the first two columns removed.

Original entry on oeis.org

1, 3, 1, 6, 4, 1, 10, 10, 5, 1, 15, 20, 15, 6, 1, 21, 35, 35, 21, 7, 1, 28, 56, 70, 56, 28, 8, 1, 36, 84, 126, 126, 84, 36, 9, 1, 45, 120, 210, 252, 210, 120, 45, 10, 1, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1, 66, 220, 495, 792, 924, 792, 495, 220, 66, 12, 1, 78, 286, 715
Offset: 2

Views

Author

Gary W. Adamson, Mar 19 2005

Keywords

Comments

A000295 (Eulerian numbers) gives the row sums.
Write A004736 and Pascal's triangle as infinite lower triangular matrices A and B; then A*B is this triangle.
From Peter Luschny, Apr 10 2011: (Start)
A slight variation has a combinatorial interpretation: remove the last column and the second one from Pascal's triangle. Let P(m, k) denote the set partitions of {1,2,..,n} with the following properties:
(a) Each partition has at least one singleton block;
(c) k is the size of the largest block of the partition;
(b) m = n - k + 1 is the number of parts of the partition.
Then A000295(n) = Sum_{k=1..n} card(P(n-k+1,k)).
For instance, A000295(4) = P(4,1) + P(3,2) + P(2,3) + P(1,4) = card({1|2|3|4}) + card({1|2|34, 1|3|24,1|4|23, 2|3|14, 2|4|13, 3|4|12}) + card({1|234, 2|134, 3|124, 4|123}) = 1 + 6 + 4 = 11.
This interpretation can be superimposed on the sequence by changing the offset to 1 and adding the value 1 in front. The triangle then starts
1;
1, 3;
1, 6, 4;
1, 10, 10, 5;
1, 15, 20, 15, 6;
...
(End)
Diagonal sums are A001924(n+1). - Philippe Deléham, Jan 11 2014
Relation to K-theory: T acting on the column vector (d,-d^2,d^3,...) generates the Euler classes for a hypersurface of degree d in CP^n. Cf. Dugger p. 168, A111492, A238363, and A135278. - Tom Copeland, Apr 11 2014

Examples

			The triangle a(n, k) begins:
  n\k  2   3   4    5    6    7    8   9  10 11 12 13
  2:   1
  3:   3   1
  4:   6   4   1
  5:  10  10   5    1
  6:  15  20  15    6    1
  7:  21  35  35   21    7    1
  8:  28  56  70   56   28    8    1
  9:  36  84 126  126   84   36    9   1
  10: 45 120 210  252  210  120   45  10   1
  11: 55 165 330  462  462  330  165  55  11  1
  12: 66 220 495  792  924  792  495 220  66 12  1
  13: 78 286 715 1287 1716 1716 1287 715 286 78 13  1
... reformatted. - _Wolfdieter Lang_, Mar 20 2015
		

Crossrefs

Cf. A000295, A007318, A008292, A104713, A027641/A027642 (first Bernoulli numbers B-), A164555/A027642 (second Bernoulli numbers B+), A176327/A176289.

Programs

  • Magma
    /* As triangle */ [[Binomial(n, k): k in [2..n]]: n in [2..10]]; // G. C. Greubel, May 15 2018
  • Mathematica
    t[n_, k_] := Binomial[n, k]; Table[ t[n, k], {n, 2, 13}, {k, 2, n}] // Flatten (* Robert G. Wilson v, Apr 16 2011 *)
  • PARI
    for(n=2, 10, for(k=2,n, print1(binomial(n,k), ", "))) \\ G. C. Greubel, May 15 2018
    

Formula

T(n,k) = binomial(n,k), for 2 <= k <= n.
From Peter Bala, Jul 16 2013: (Start)
The following remarks assume an offset of 0.
Riordan array (1/(1 - x)^3, x/(1 - x)).
O.g.f.: 1/(1 - t)^2*1/(1 - (1 + x)*t) = 1 + (3 + x)*t + (6 + 4*x + x^2)*t^2 + ....
E.g.f.: (1/x*d/dt)^2 (exp(t)*(exp(x*t) - 1 - x*t)) = 1 + (3 + x)*t + (6 + 4*x + x^2)*t^2/2! + ....
The infinitesimal generator for this triangle has the sequence [3,4,5,...] on the main subdiagonal and 0's elsewhere. (End)
As triangle T(n,k), 0<=k<=n: T(n,k) = 3*T(n-1,k) + T(n-1,k-1) - 3*T(n-2,k) - 2*T(n-2,k-1) + T(n-3,k) + T(n-3,k-1), T(0,0)=1, T(n,k)=0 if k<0 or if k>n. - Philippe Deléham, Jan 11 2014
From Tom Copeland, Apr 11 2014: (Start)
A) The infinitesimal generator for this matrix is given in A132681 with m=2. See that entry for numerous relations to differential operators and the Laguerre polynomials of order m=2, i.e., Lag(n,t,2) = Sum_{j=0..n} binomial(n+2,n-j)*(-t)^j/j!.
B) O.g.f.: 1 / { [ 1 - t * x/(1-x) ] * (1-x)^3 }
C) O.g.f. of row e.g.f.s: exp[t*x/(1-x)]/(1-x)^3 = [Sum_{n>=0} x^n * Lag(n,-t,2)] = 1 + (3 + t)*x + (6 + 4t + t^2/2!)*x^2 + (10 + 10t + 5t^2/2! + t^3/3!)*x^3 + ....
D) E.g.f. of row o.g.f.s: [(1+t)*exp((1+t)*x) - (1+t+t*x)exp(x)]/t^2. (End)
O.g.f. for m-th row (m=n-2): [(1+x)^(m+2)-(1+(m+2)*x)]/x^2. - Tom Copeland, Apr 16 2014
Reverse T = [St2]*dP*[St1]- dP = [St2]*(exp(x*M)-I)*[St1]-(exp(x*M)-I) with top two rows of zeros removed, [St1]=padded A008275 just as [St2]=A048993=padded A008277, dP= A132440, M=A238385-I, and I=identity matrix. Cf. A238363. - Tom Copeland, Apr 26 2014
O.g.f. of column k (with k leading zeros): (x^k)/(1-x)^(k+1), k >= 2. - Wolfdieter Lang, Mar 20 2015

Extensions

Edited and extended by David Wasserman, Jul 03 2007

A002664 a(n) = 2^n - C(n,0)- ... - C(n,4).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 7, 29, 93, 256, 638, 1486, 3302, 7099, 14913, 30827, 63019, 127858, 258096, 519252, 1042380, 2089605, 4185195, 8377705, 16764265, 33539156, 67090962, 134196874, 268411298, 536843071, 1073709893
Offset: 0

Views

Author

Keywords

Comments

From Gary W. Adamson, Jul 24 2010: (Start)
Starting with "1" = eigensequence of a triangle with binomial C(n,5):
(1, 6, 21, 56, ...) as the left border and the rest 1's. (End)
The Kn26 sums, see A180662, of triangle A065941 equal the terms (doubled) of this sequence minus the five leading zeros. - Johannes W. Meijer, Aug 15 2011
Starting (0, 0, 0, 0, 1, 7, 29, ...), this is the binomial transform of (0, 0, 0, 0, 1, 2, 2, 2, ...). Starting (1, 7, 29, ...), this is the binomial transform of (1, 6, 16, 26, 31, 32, 32, 32, ...). - Gary W. Adamson, Jul 28 2015

References

  • J. H. Conway and R. K. Guy, The Book of Numbers, New York: Springer-Verlag, 1995, Chapter 3, pp. 76-79.
  • J. Eckhoff, Der Satz von Radon in konvexen Productstrukturen II, Monat. f. Math., 73 (1969), 7-30.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n) = A055248(n, 5). Partial sums of A002663.
Cf. A007318.

Programs

  • Haskell
    a002664 n = a002664_list !! n
    a002664_list = map (sum . drop 5) a007318_tabl
    -- Reinhard Zumkeller, Jun 20 2015
  • Magma
    [2^n-n^4/24+n^3/12-11*n^2/24-7*n/12-1: n in [0..35]]; // Vincenzo Librandi, May 20 2011
    
  • Maple
    a:=n->sum(binomial(n+1,2*j),j=3..n+1): seq(a(n), n=0..30); # Zerinvary Lajos, May 12 2007
    A002664:=1/(2*z-1)/(z-1)**5; # conjectured by Simon Plouffe in his 1992 dissertation
  • Mathematica
    a=1;lst={};s1=s2=s3=s4=s5=0;Do[s1+=a;s2+=s1;s3+=s2;s4+=s3;s5+=s4;AppendTo[lst,s5];a=a*2,{n,5!}];lst (* Vladimir Joseph Stephan Orlovsky, Jan 10 2009 *)
    Table[Sum[ Binomial[n, k + 5], {k, 0, n}], {n, 0, 30}] (* Zerinvary Lajos, Jul 08 2009 *)
    Table[2^n-Total[Binomial[n,Range[0,4]]],{n,0,30}] (* or *) LinearRecurrence[ {7,-20,30,-25,11,-2},{0,0,0,0,0,1},40] (* Harvey P. Dale, Sep 03 2016 *)

Formula

G.f.: x^5/((1-2*x)*(1-x)^5).
a(n) = Sum_{k=0..n} C(n, k+5) = Sum_{k=5..n} C(n, k); a(n) = 2a(n-1) + C(n-1, 4). - Paul Barry, Aug 23 2004
a(n) = 2^n - n^4/24 + n^3/12 - 11*n^2/24 - 7*n/12 - 1. - Bruno Berselli, May 19 2011 [Robinson (1985) gives an alternative version of this formula, for a different offset. - N. J. A. Sloane, Oct 20 2015]
E.g.f.: exp(x)*(24*(exp(x) - 1) - 24*x - 12*x^2 - 4*x^3 - x^4)/24. - Stefano Spezia, Mar 09 2025

A035038 a(n) = 2^n - C(n,0) - C(n,1) - ... - C(n,5).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 8, 37, 130, 386, 1024, 2510, 5812, 12911, 27824, 58651, 121670, 249528, 507624, 1026876, 2069256, 4158861, 8344056, 16721761, 33486026, 67025182, 134116144, 268313018, 536724316, 1073567387, 2147277280, 4294724471, 8589650318, 17179537972
Offset: 0

Views

Author

Keywords

Comments

Starting with "1", equals the eigensequence of a triangle with A000579 = binomial(n,6) = (1, 7, 28, 84, 210, ...) as the left column and the rest 1's. - Gary W. Adamson, Jul 24 2010

Crossrefs

Programs

  • Haskell
    a035038 n = a035038_list !! n
    a035038_list = map (sum . drop 6) a007318_tabl
    -- Reinhard Zumkeller, Jun 20 2015
    
  • Magma
    [n le 5 select 0 else (&+[Binomial(n,j): j in [6..n]]): n in [0..50]]; // G. C. Greubel, Mar 20 2023
    
  • Maple
    a:= n-> (Matrix(7, (i,j)-> if (i=j-1) then 1 elif j=1 then [8,-27,50,-55, 36,-13,2][i] else 0 fi)^(n))[1,7]:
    seq(a(n), n=0..30);  # Alois P. Heinz, Aug 05 2008
  • Mathematica
    Table[Sum[Binomial[n, k+6], {k,0,n}], {n,0,30}] (* Zerinvary Lajos, Jul 08 2009 *)
    Table[2^n-Total[Binomial[n,Range[0,5]]],{n,0,40}] (* Harvey P. Dale, Oct 24 2017 *)
  • SageMath
    [sum(binomial(n,j) for j in range(6,n+1)) for n in range(51)] # G. C. Greubel, Mar 20 2023

Formula

From Paul Barry, Aug 23 2004: (Start)
G.f.: x^6/((1-2*x)*(1-x)^6).
a(n) = Sum_{k=0..n} C(n, k+6) = Sum_{k=6..n} C(n, k).
a(n) = 2*a(n-1) + C(n-1, 5). (End)

A086787 a(n) = Sum_{i=1..n} ( Sum_{j=1..n} i^j ).

Original entry on oeis.org

1, 8, 56, 494, 5699, 82200, 1419760, 28501116, 651233661, 16676686696, 472883843992, 14705395791306, 497538872883727, 18193397941038736, 714950006521386976, 30046260016074301944, 1344648068888240941017
Offset: 1

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Aug 04 2003

Keywords

Comments

p divides a(p+1) for all prime p except 3. p^2 divides a(p+1) for prime p in A123374.
2 divides a(n) for n = {2, 3, 4, 6, 7, 8, 10, 11, 12, 14, 15, 16, 18, 19, 20, 22, 23, 24, 26, 27, 28, 30, 31, 32, 34, 35, 36, 38, 39, 40, 42, 43, 44, 46, 47, 48, 50, ...}.
2^2 divides a(n) for n = {2, 3, 6, 7, 8, 10, 11, 14, 15, 16, 18, 19, 22, 23, 24, 26, 27, 30, 31, 32, 34, 35, 38, 39, 40, 42, 43, 46, 47, 48, 50, ...}.
2^3 divides a(n) for n = {2, 3, 6, 7, 10, 11, 14, 15, 16, 18, 19, 22, 23, 26, 27, 30, 31, 32, 34, 35, 38, 39, 42, 43, 46, 47, 48, 50, ...}.
2^4 divides a(n) for n = {7, 14, 15, 18, 23, 30, 31, 32, 34, 39, 46, 47, 50, ...}.
2^5 divides a(n) for n = {15, 30, 31, 34, 47, 62, 63, 64, 66, 79, 94, 95, 98, ...}.
2^6 divides a(n) for n = {31, 62, 63, 66, 95, ...}.
2^7 divides a(n) for n = {63, 126, 127, 130, ...}.
It appears that for k > 2 the least few n such that a(n) is divisible by 2^(k+1) are n = {(2^k-1), 2*(2^k-1), 2*(2^k-1)+1, 2*(2^k-1)+3, 3*(2^k-1)+2, 4*(2^k-1)+2, 4*(2^k-1)+3, 4*(2^k-1)+4, 4*(2^k-1)+6, 5*(2^k-1)+4, 6*(2^k-1)+4, 6*(2^k-1)+5, 6*(2^k-1)+8, ...}. - Alexander Adamchuk, Oct 08 2006
Numbers n that divide a(n) are listed in A014741. - Alexander Adamchuk, Nov 03 2006

Examples

			a(2) = 8 = 1 + 1 + 2 + 4 = 1^1 + 1^2 + 2^1 + 2^2.
		

Crossrefs

Programs

  • Maple
    seq(1-Psi(n)-gamma+sum(i^(n+1)/(i-1),i = 2 .. n),n=1..20);
  • Mathematica
    Table[Sum[i^j,{i,1,n},{j,1,n}],{n,1,24}] (* Alexander Adamchuk, Oct 08 2006 *)
    Table[ n + Sum[ i*(i^n-1)/(i-1), {i,2,n} ], {n,1,17} ] (* Alexander Adamchuk, Nov 03 2006 *)
  • PARI
    a(n)=sum(i=1,n,sum(j=1,n,i^j)) \\ Charles R Greathouse IV, Jul 19 2013
    
  • PARI
    a(n)=round(1-psi(n)-Euler+sum(i=2,n,i^(n+1)/(i-1))) \\ Charles R Greathouse IV, Jul 19 2013
    
  • Python
    def A086787(n): return sum(i**j for i in range(1,n+1) for j in range(1,n+1)) # Chai Wah Wu, Jan 08 2022
    
  • Python
    from sympy import digamma, EulerGamma
    from fractions import Fraction
    def A086787(n): return 1-digamma(n)-EulerGamma + sum(Fraction(i**(n+1),i-1) for i in range(2,n+1)) # Chai Wah Wu, Jan 08 2022

Formula

1 - Psi(n) - gamma + Sum_{i=2..n} (i^(n+1)/(i-1)), where Psi(n) is the digamma function and gamma is Euler's constant.
a(n) = Sum[ i^j, {i,1,n}, {j,1,n} ] = n + Sum[ i*(i^n - 1)/(i - 1), {i,2,n} ]. - Alexander Adamchuk, Nov 03 2006
a(n) = Sum_{k=1..n} (B(k+1, n+1) - B(k+1, 1))/(k+1), where B(n, x) are the Bernoulli polynomials. - Daniel Suteu, Jun 25 2018
a(n) ~ c * n^n, where c = 1 / (1 - exp(-1)) = A185393 = 1.58197670686932642438... - Vaclav Kotesovec, Nov 06 2021

Extensions

Edited by Max Alekseyev, Jan 29 2012
Previous Showing 21-30 of 205 results. Next