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 10 results.

A008518 Triangle of Eulerian numbers with rows multiplied by 1 + x.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 5, 5, 1, 1, 12, 22, 12, 1, 1, 27, 92, 92, 27, 1, 1, 58, 359, 604, 359, 58, 1, 1, 121, 1311, 3607, 3607, 1311, 121, 1, 1, 248, 4540, 19912, 31238, 19912, 4540, 248, 1, 1, 503, 15110, 102842, 244424, 244424, 102842, 15110, 503, 1
Offset: 0

Views

Author

Keywords

Examples

			Triangle begins:
   1;
   1,   1;
   1,   2,    1;
   1,   5,    5,    1;
   1,  12,   22,   12,    1;
   1,  27,   92,   92,   27,    1;
   1,  58,  359,  604,  359,   58,   1;
   1, 121, 1311, 3607, 3607, 1311, 121, 1;
   ...
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 243.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 254.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 215.

Crossrefs

Cf. A000007, A008292, A098558 (row sums), A177042 (T(2*n, n)).
Columns include A000325 (k=1).

Programs

  • Magma
    Eulerian:= func< n, k | (&+[(-1)^j*Binomial(n+1, j)*(k-j+1)^n: j in [0..k+1]]) >;
    [Eulerian(n, k-1) + Eulerian(n, k): k in [0..n], n in [0..10]]; // G. C. Greubel, Jun 18 2024
    
  • Mathematica
    t[n_ /; n >= 0, 0] = 1; t[n_, k_] /; k<0 || k>n = 0; t[n_, k_] := t[n, k] = (n-k) t[n-1, k-1] + (k+1) t[n-1, k];
    A[n_, k_] /; k == n+1 = 0; A[n_, k_] := t[n, n-k];
    T[n_, k_] := A[n, k] + A[n, k+1];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 26 2019, after Franck Maminirina Ramaharo *)
  • SageMath
    def Eulerian(n,k): return sum((-1)^j*binomial(n+1, j)*(k-j+1)^n for j in range(k+2))
    flatten([[Eulerian(n,k-1) + Eulerian(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jun 18 2024

Formula

E.g.f.: (exp(x) - y*exp(y*x))/(exp(y*x) - y*exp(x)). - Vladeta Jovovic, Apr 06 2001
T(n,k) = A123125(n,k) + A123125(n,k+1), with A123125(n,n+1) = 0. - Franck Maminirina Ramaharo, Oct 21 2018
From G. C. Greubel, Jun 18 2024: (Start)
T(n, n-k) = T(n, k).
Sum_{k=0..n} (-1)^k*T(n, k) = A000007(n). (End)

Extensions

More terms from Vladeta Jovovic, Apr 06 2001

A303285 Number of permutations p of [2n] such that the sequence of ascents and descents of p0 forms a Dyck path.

Original entry on oeis.org

1, 1, 8, 172, 7296, 518324, 55717312, 8460090160, 1726791794432, 456440969661508, 151770739970889792, 62022635037246022000, 30564038464166725328768, 17876875858414492985045712, 12245573879235563308351042496, 9711714975145772145881269175104
Offset: 0

Views

Author

Alois P. Heinz, Apr 20 2018

Keywords

Comments

Here p is a permutation of 1,2,3,...,2n, and p0 refers to the string p followed by 0.
Also the number of permutations p of [2n] such that the sequence of ascents and descents of 0p forms a Dyck path. a(2) = 8: 1432, 2143, 2431, 3142, 3241, 3421, 4132, 4231.
Also the number of permutations p of [2n] that are of odd order and whose M statistic (as defined in the Spiro paper) is equal to n-1. - Sam Spiro, Nov 01 2018

Examples

			a(0) = 1: the empty permutation.
a(1) = 1: 12.
a(2) = 8: 1243, 1324, 1342, 1423, 2314, 2341, 2413, 3412.
		

Crossrefs

Bisection (even part) of A303284.
Bisection (even part) of A303287.
Column k=0 of A316728.

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
          `if`(t>0,   add(b(u-j, o+j-1, t-1), j=1..u), 0)+
          `if`(o+u>t, add(b(u+j-1, o-j, t+1), j=1..o), 0))
        end:
    a:= n-> b(0, 2*n, 0):
    seq(a(n), n=0..20);
  • Mathematica
    b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, If[t > 0, Sum[b[u - j, o + j - 1, t - 1], {j, 1, u}], 0] + If[o + u > t, Sum[b[u + j - 1, o - j, t + 1], {j, 1, o}], 0]];
    a[n_] := b[0, 2n, 0];
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, May 29 2018, from Maple *)
  • PARI
    \\ here b(n) is A177042
    b(n)={if(n==0, 1, 2*sum(k=0, n, (-1)^k*binomial(2*n+1,k)*(n-k+1)^(2*n)));}
    a(n)={if(n==0, 1, sum(k=1, n, binomial(2*n, 2*k-1)*b(k-1)*b(n-k))/2);} \\ Andrew Howroyd, Nov 01 2018

Formula

a(n) ~ c * 2^(2*n) * n^(2*n - 1) / exp(2*n), where c = 8.838022110416151362523442920999767406145711133564692... - Vaclav Kotesovec, May 22 2018
a(n) = (1/2)*Sum_{k odd} binomial(2*n,k)*A177042((k-1)/2)*A177042((2n-k-1)/2) for n>0. - Sam Spiro, Nov 01 2018
a(n) = A321280(2n,n-1) for n >= 1. - Alois P. Heinz, Nov 02 2018

A303287 Number of permutations p of [n] such that the sequence of ascents and descents of p or of p0 (if n is even) forms a Dyck path.

Original entry on oeis.org

1, 1, 1, 2, 8, 22, 172, 604, 7296, 31238, 518324, 2620708, 55717312, 325024572, 8460090160, 55942352184, 1726791794432, 12765597850950, 456440969661508, 3730771315561300, 151770739970889792, 1359124435588313876, 62022635037246022000, 603916464771468176392
Offset: 0

Views

Author

Alois P. Heinz, Apr 20 2018

Keywords

Examples

			a(0) = 1: the empty permutation.
a(1) = 1: 1.
a(2) = 1: 12.
a(3) = 2: 132, 231.
a(4) = 8: 1243, 1324, 1342, 1423, 2314, 2341, 2413, 3412.
a(5) = 22: 12543, 13254, 13542, 14253, 14352, 14532, 15243, 15342, 23154, 23541, 24153, 24351, 24531, 25143, 25341, 34152, 34251, 34521, 35142, 35241, 45132, 45231.
		

Crossrefs

Bisections give: A303285 (even part), A177042 (odd part).

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
          `if`(t>0,   add(b(u-j, o+j-1, t-1), j=1..u), 0)+
          `if`(o+u>t, add(b(u+j-1, o-j, t+1), j=1..o), 0))
        end:
    a:= n-> b(n, 0, 1):
    seq(a(n), n=0..25);
  • Mathematica
    b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, If[t > 0, Sum[b[u - j, o + j - 1, t - 1], {j, 1, u}], 0] + If[o + u > t, Sum[b[u + j - 1, o - j, t + 1], {j, 1, o}], 0]];
    a[n_] := b[n, 0, 1];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, May 25 2018, translated from Maple *)

Formula

a(2n) = A303284(2n).

A316728 Number T(n,k) of permutations of {0,1,...,2n} with first element k whose sequence of ascents and descents forms a Dyck path; triangle T(n,k), n>=0, 0<=k<=2n, read by rows.

Original entry on oeis.org

1, 1, 1, 0, 8, 7, 5, 2, 0, 172, 150, 121, 87, 52, 22, 0, 7296, 6440, 5464, 4411, 3337, 2306, 1380, 604, 0, 518324, 463578, 405024, 344260, 283073, 223333, 166856, 115250, 69772, 31238, 0, 55717312, 50416894, 44928220, 39348036, 33777456, 28318137, 23068057, 18117190, 13543456, 9409366, 5759740, 2620708, 0
Offset: 0

Views

Author

Alois P. Heinz, Jul 11 2018

Keywords

Examples

			T(2,0) = 8: 01432, 02143, 02431, 03142, 03241, 03421, 04132, 04231.
T(2,1) = 7: 12043, 12430, 13042, 13240, 13420, 14032, 14230.
T(2,2) = 5: 23041, 23140, 23410, 24031, 24130.
T(2,3) = 2: 34021, 34120.
T(2,4) = 0.
Triangle T(n,k) begins:
       1;
       1,      1,      0;
       8,      7,      5,      2,      0;
     172,    150,    121,     87,     52,     22,      0;
    7296,   6440,   5464,   4411,   3337,   2306,   1380,    604,     0;
  518324, 463578, 405024, 344260, 283073, 223333, 166856, 115250, 69772, 31238, 0;
		

Crossrefs

Column k=0 gives A303285.
Row sums and T(n+1,2n+1) give A177042.
T(n,n) gives A316727.
T(n+1,n) gives A316730.
T(n,2n) gives A000007.
Cf. A079484.

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
          `if`(t>0,   add(b(u-j, o+j-1, t-1), j=1..u), 0)+
          `if`(o+u>t, add(b(u+j-1, o-j, t+1), j=1..o), 0))
        end:
    T:= (n, k)-> b(k, 2*n-k, 0):
    seq(seq(T(n, k), k=0..2*n), n=0..8);
  • Mathematica
    b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1,
         If[t > 0,     Sum[b[u - j, o + j - 1, t - 1], {j, 1, u}], 0] +
         If[o + u > t, Sum[b[u + j - 1, o - j, t + 1], {j, 1, o}], 0]];
    T[n_, k_] := b[k, 2n - k, 0];
    Table[Table[T[n, k], {k, 0, 2n}], {n, 0, 8}] // Flatten (* Jean-François Alcover, Mar 27 2021, after Alois P. Heinz *)

Formula

Sum_{k=0..2n} T(n,k) = T(n+1,2n+1) = A177042(n).
Sum_{k=0..2n} (k+1) * T(n,k) = A079484(n).

A172010 a(n) = 2*A142458(2*n, n)/(n+1).

Original entry on oeis.org

1, 26, 2741, 683870, 315704418, 234725594388, 257237392999893, 390832857108454838, 787178784737043042806, 2031210797603911366282796, 6536955866068372922068141666, 25676217636579568989377656129516, 120915166829869713032692550819662756, 672580820552232143302651758669053327784
Offset: 1

Views

Author

Roger L. Bagula, Nov 19 2010

Keywords

Crossrefs

Programs

  • Mathematica
    T[n_, k_, m_]:= T[n,k,m]= If[k==1 || k==n, 1, (m*n-m*k+1)*T[n-1,k-1,m] + (m*k-m+ 1)*T[n-1,k,m]];
    a[n_]:= 2*T[2*n,n,3]/(n+1);
    Table[a[n], {n,30}] (* modified by G. C. Greubel, Mar 14 2022 *)
  • Sage
    @CachedFunction
    def T(n,k,m): # A142458
        if (k==1 or k==n): return 1
        else: return (m*(n-k)+1)*T(n-1,k-1,m) + (m*k-m+1)*T(n-1,k,m)
    [2*T(2*n,n,3)/(n+1) for n in (1..30)] # G. C. Greubel, Mar 14 2022

Formula

a(n) = 2*A142458(2*n, n)/(n+1).

Extensions

Name corrected and more terms added by G. C. Greubel, Mar 14 2022

A321280 Number T(n,k) of permutations p of [n] with exactly k descents such that the up-down signature of p has nonnegative partial sums; triangle T(n,k), n>=0, 0<=k<=max(0,floor((n-1)/2)), read by rows.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 8, 1, 22, 22, 1, 52, 172, 1, 114, 856, 604, 1, 240, 3488, 7296, 1, 494, 12746, 54746, 31238, 1, 1004, 43628, 330068, 518324, 1, 2026, 143244, 1756878, 5300418, 2620708, 1, 4072, 457536, 8641800, 43235304, 55717312, 1, 8166, 1434318, 40298572, 309074508, 728888188, 325024572
Offset: 0

Views

Author

Alois P. Heinz, Nov 01 2018

Keywords

Examples

			Triangle T(n,k) begins:
  1;
  1;
  1;
  1,     2;
  1,     8;
  1,    22,      22;
  1,    52,     172;
  1,   114,     856,       604;
  1,   240,    3488,      7296;
  1,   494,   12746,     54746,      31238;
  1,  1004,   43628,    330068,     518324;
  1,  2026,  143244,   1756878,    5300418,    2620708;
  1,  4072,  457536,   8641800,   43235304,   55717312;
  1,  8166, 1434318,  40298572,  309074508,  728888188,  325024572;
  1, 16356, 4438540, 180969752, 2026885824, 7589067592, 8460090160;
  ...
		

Crossrefs

Columns k=0-3 give: A000012, A005803 (for n>0), A321268, A321269.
Row sums give A000246.
T(2n+1,n) gives A177042.
T(2n+2,n) gives A303285(n+1).

Programs

  • Maple
    b:= proc(u, o, c) option remember; `if`(c<0, 0, `if`(u+o=0, 1/x,
           add(expand(x*b(u-j, o-1+j, c-1)), j=1..u)+
           add(b(u+j-1, o-j, c+1), j=1..o)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(`if`(n=0, 1, b(n, 0, 1))):
    seq(T(n), n=0..14);
  • Mathematica
    b[u_, o_, c_] := b[u, o, c] = If[c < 0, 0, If[u + o == 0, 1/x, Sum[Expand[ x*b[u - j, o - 1 + j, c - 1]], {j, 1, u}] + Sum[b[u + j - 1, o - j, c + 1], {j, 1, o}]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][ If[n == 0, 1, b[n, 0, 1]]];
    Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Dec 08 2018, after Alois P. Heinz *)

A321268 Number of permutations on [n] whose up-down signature has nonnegative partial sums and which have exactly two descents.

Original entry on oeis.org

0, 0, 0, 0, 22, 172, 856, 3488, 12746, 43628, 143244, 457536, 1434318, 4438540, 13611136, 41473216, 125797010, 380341580, 1147318004, 3455325600, 10394291094, 31242645420, 93853769320, 281825553760, 846030314842, 2539248578732, 7620161662556, 22865518160768
Offset: 1

Views

Author

Sam Spiro, Nov 01 2018

Keywords

Comments

Also the number of permutations of [n] of odd order whose M statistic (as defined in the Spiro paper) is equal to two.

Examples

			Some permutations counted by a(5) include 14253 and 34521.
		

Crossrefs

Column k=2 of A321280.

Programs

  • Mathematica
    a[1] = 0; a[n_] := 2n^2 - 2n - 1 - n 2^(n-1) - 2 Binomial[n, 3] + Sum[ Binomial[n, k] (2^k - 2k), {k, 0, n}];
    Table[a[n], {n, 1, 28}] (* Jean-François Alcover, Nov 11 2018 *)
  • PARI
    a(n)={if(n<2, 0, 2*n^2 - 2*n - 1 - n*2^(n-1) - 2*binomial(n,3) + sum(k=0, n, binomial(n, k)*(2^k - 2*k)))} \\ Andrew Howroyd, Nov 01 2018
    
  • PARI
    concat([0,0,0,0], Vec(2*x^5*(11 - 35*x + 32*x^2 - 6*x^3) / ((1 - x)^4*(1 - 2*x)^2*(1 - 3*x)) + O(x^40))) \\ Colin Barker, Mar 07 2019

Formula

a(n) = 3*A008292(n-1,3)- 2*binomial(n,3)+binomial(n,2)-1 for n > 1.
a(n) = A065826(n-1,3)- 2*binomial(n,3)+binomial(n,2)-1 for n > 1.
a(n) = 3^n-3*n*2^(n-1)-2*binomial(n,3)+4*binomial(n,2)-1 for n > 1.
From Colin Barker, Mar 07 2019: (Start)
G.f.: 2*x^5*(11 - 35*x + 32*x^2 - 6*x^3) / ((1 - x)^4*(1 - 2*x)^2*(1 - 3*x)).
a(n) = 11*a(n-1) - 50*a(n-2) + 122*a(n-3) - 173*a(n-4) + 143*a(n-5) - 64*a(n-6) + 12*a(n-7) for n>8.
a(n) = -1 + 3^n - (16+9*2^n)*n/6 + 3*n^2 - n^3/3 for n>1.
(End)

A321269 Number of permutations on [n] whose up-down signature has nonnegative partial sums and which have exactly three descents.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 604, 7296, 54746, 330068, 1756878, 8641800, 40298572, 180969752, 790697160, 3385019968, 14270283414, 59457742524, 245507935018, 1006678811272, 4105447763032, 16672235476128, 67482738851220, 272439143364672, 1097660274098482, 4415486996246052
Offset: 1

Views

Author

Sam Spiro, Nov 01 2018

Keywords

Comments

Also the number of permutations of [n] of odd order whose M statistic (as defined in the Spiro paper) is equal to three.

Examples

			The permutations counted by a(7) include 1237654 and 17265243.
		

Crossrefs

Column k=3 of A321280.

Programs

  • Mathematica
    t[n_, k_] := Sum[(-1)^j (k - j)^n Binomial[n + 1, j], {j, 0, k}];
    a[n_] := If[n<7, 0, 4 t[n-1, 4] - (Binomial[n, 3] - Binomial[n, 2] + 4) * 2^(n-2) - 22 Binomial[n, 5] + 16 Binomial[n, 4] - 4 Binomial[n, 3] + 2n];
    Array[a, 30] (* Jean-François Alcover, Feb 29 2020, from Sam Spiro's 1st formula *)
  • PARI
    concat([0,0,0,0,0,0], Vec(2*x^7*(302 - 3600*x + 18341*x^2 - 52006*x^3 + 89327*x^4 - 94728*x^5 + 61016*x^6 - 23368*x^7 + 5424*x^8 - 576*x^9) / ((1 - x)^6*(1 - 2*x)^4*(1 - 3*x)^2*(1 - 4*x)) + O(x^30))) \\ Colin Barker, Mar 07 2019

Formula

From Sam Spiro, Mar 07 2019: (Start)
a(n) = 4*A008292(n-1,4)-(binomial(n,3)-binomial(n,2)+4)*2^(n-2)-22*binomial(n,5)+16*binomial(n,4)-4*binomial(n,3)+2n for n>3.
a(n) = A065826(n-1,4)-(binomial(n,3)-binomial(n,2)+4)*2^(n-2)-22*binomial(n,5)+16*binomial(n,4)-4*binomial(n,3)+2n for n>3.
a(n) = 4^n-4*n*3^(n-1)+9*binomial(n,2)*2^(n-2)-binomial(n,3)*2^(n-2)-2^n-8*binomial(n,3)-22*binomial(n,5)+16*binomial(n,4)+2*n for n>3.
(End)
From Colin Barker, Mar 07 2019: (Start)
G.f.: 2*x^7*(302 - 3600*x + 18341*x^2 - 52006*x^3 + 89327*x^4 - 94728*x^5 + 61016*x^6 - 23368*x^7 + 5424*x^8 - 576*x^9) / ((1 - x)^6*(1 - 2*x)^4*(1 - 3*x)^2*(1 - 4*x)).
a(n) = 24*a(n-1) - 260*a(n-2) + 1684*a(n-3) - 7278*a(n-4) + 22172*a(n-5) - 49004*a(n-6) + 79596*a(n-7) - 95065*a(n-8) + 82508*a(n-9) - 50616*a(n-10) + 20800*a(n-11) - 5136*a(n-12) + 576*a(n-13) for n>16.
(End)

Extensions

More terms from Alois P. Heinz, Nov 01 2018

A181088 a(n) = A181089(2*n+1,n)/(n+2).

Original entry on oeis.org

1, -4, -40, 672, 8064, -253440, -3294720, 153753600, 2091048960, -130025226240, -1820353167360, 141707492720640, 2024392753152000, -189483161695027200, -2747505844577894400, 300609462994993152000, 4408938790593232896000
Offset: 0

Views

Author

Roger L. Bagula, Oct 02 2010

Keywords

Comments

What are the constraints on left-right symmetric triangles t(n,m) such that t(2*n,n)/(n+1) are integers?

Crossrefs

Programs

  • Mathematica
    (* First program *)
    p[x_, n_] = HermiteH[n, x] + ExpandAll[x^n*HermiteH[n, 1/x]];
    b:= Table[CoefficientList[p[x, n], x], {n, 0, 50}];
    Table[b[[2*n+2, n+1]]/(n+2), {n,0,20}]
    (* Second program *)
    A060821[n_, k_]:= If[EvenQ[n-k], (-1)^(Floor[(n-k)/2])*2^k*n!/(k!*(Floor[(n - k)/2]!)), 0];
    a[n_]:= (A060821[2*n+1, n] + A060821[2*n+1, n+1])/(n+2);
    Table[a[n], {n, 0, 25}] (* G. C. Greubel, Apr 04 2021 *)
  • Sage
    def A060821(n,k): return (-1)^((n-k)//2)*2^k*factorial(n)/(factorial(k)*factorial( (n-k)//2)) if (n-k)%2==0 else 0
    def a(n): return (A060821(2*n+1, n) + A060821(2*n+1, n+1))/(n+2)
    [a(n) for n in (0..25)] # G. C. Greubel, Apr 04 2021

Formula

a(n) = (A060821(2*n+1, n) + A060821(2*n+1, n+1))/(n+2). - G. C. Greubel, Apr 04 2021

A141693 Triangle read by rows: T(n,k) = (2*k - n)*A008292(n,k) with T(n,n) = n, 0 <= k <= n, where A008292 is the triangle of Eulerian numbers.

Original entry on oeis.org

0, -1, 1, -2, 0, 2, -3, -4, 1, 3, -4, -22, 0, 2, 4, -5, -78, -66, 26, 3, 5, -6, -228, -604, 0, 114, 4, 6, -7, -600, -3573, -2416, 1191, 360, 5, 7, -8, -1482, -17172, -31238, 0, 8586, 988, 6, 8, -9, -3514, -73040, -264702, -156190, 88234, 43824, 2510, 7, 9, -10
Offset: 0

Views

Author

Roger L. Bagula, Sep 09 2008

Keywords

Examples

			Triangle begins:
    0;
   -1,     1;
   -2,     0,      2;
   -3,    -4,      1,       3;
   -4,   -22,      0,       2,       4;
   -5,   -78,    -66,      26,       3,     5;
   -6,  -228,   -604,       0,     114,     4,    6;
   -7,  -600,  -3573,   -2416,    1191,   360,    5,     7;
   -8, -1482, -17172,  -31238,       0,  8586,  988,     6, 8;
   -9, -3514, -73040, -264702, -156190, 88234, 43824, 2510, 7, 9;
  ...
		

Crossrefs

Cf. A008292.

Programs

  • Maple
    T:= proc(n,k) `if`(n=k,n,(2*k-n)*add((-1)^j*(k-j+1)^n*binomial(n+1,j),j=0..k)); end proc: seq(seq(T(n,k),k=0..n),n=0..10); # Muniru A Asiru, Oct 06 2018
    T := (n, k) -> `if`(n = k, n, (2*k - n)*combinat:-eulerian1(n,k)):
    seq(seq(T(n,k), k=0..n), n=0..9); # Peter Luschny, Oct 06 2018
  • Mathematica
    T[n_, k_] = If[n == k, n, (2*k - n)*Sum[(-1)^j*(k - j + 1)^n*Binomial[n + 1, j], {j, 0, k}]];
    Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}]//Flatten
  • Maxima
    T(n, k) := if n = k then n else (2*k - n)*sum((-1)^j*(k - j + 1)^n*binomial(n + 1, j), j, 0, k)$
    tabl(nn) := for n:0 thru nn do print(makelist(T(n, k), k, 0, n))$ /* Franck Maminirina Ramaharo, Oct 05 2018 */

Formula

Sum_{k=0..n} T(n,k) = A005096(n), n > 0.
From Franck Maminirina Ramaharo, Oct 06 2018: (Start)
T(n,k) = (2*k - n)*Sum_{j=0..k} (-1)^j*(k - j + 1)^n*binomial(n + 1, j) for 0 <= k <= n - 1 and T(n,n) = n.
T(2*n-1,n-1) = -A025585(n).
T(2*n,n-1) = -A177042(n). (End)

Extensions

Edited, new name and offset corrected by Franck Maminirina Ramaharo, Oct 06 2018
Showing 1-10 of 10 results.