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 45 results. Next

A003101 a(n) = Sum_{k = 1..n} (n - k + 1)^k.

Original entry on oeis.org

0, 1, 3, 8, 22, 65, 209, 732, 2780, 11377, 49863, 232768, 1151914, 6018785, 33087205, 190780212, 1150653920, 7241710929, 47454745803, 323154696184, 2282779990494, 16700904488705, 126356632390297, 987303454928972, 7957133905608836, 66071772829247409
Offset: 0

Views

Author

Keywords

Comments

For n > 0: a(n) = sum of row n of triangles A051129 and A247358. - Reinhard Zumkeller, Sep 14 2014
a(n-1) is the number of set partitions of [n] into two or more blocks such that all absolute differences between least elements of consecutive blocks are 1. a(3) = 8: 134|2, 13|24, 14|23, 1|234, 14|2|3, 1|24|3, 1|2|34, 1|2|3|4. - Alois P. Heinz, May 22 2017
Min_{n >= 1} a(n+1)/a(n) = 8/3. This is the answer to the 4th problem proposed during the first day of the final round of the 16th Austrian Mathematical Olympiad in 1985 (see link IMO Compendium). - Bernard Schott, Jan 07 2019
If n rings of different internal diameter can fit close together on a tapering column, a(n) is the number of different arrangements of at least one ring. For example, if the rings increasing in size are 1, 2 and 3, then a(3) = 8 corresponding to the possible arrangements from the point on the column of smallest diameter (1XX), (X2X), (XX3), (12X), (32X), (1X3), (X23) and (123), where X denotes a space on the column. - Ian Duff, Jun 23 2025

Examples

			For n = 3 we get a(3) = 3^1 + 2^2 + 1^3 = 8. For n = 4 we get a(4) = 4^1 + 3^2 + 2^3 + 1^4 = 22.
		

References

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

Crossrefs

First differences are in A047970.

Programs

  • Haskell
    a003101 n = sum $ zipWith (^) [0 ..] [n + 1, n .. 1]
    -- Reinhard Zumkeller, Sep 14 2014
    
  • Magma
    [n eq 0 select 0 else (&+[(n-j+1)^j: j in [1..n]]): n in [0..50]]; // G. C. Greubel, Oct 26 2022
    
  • Maple
    A003101 := n->add((n-k+1)^k, k=1..n);
    a:= n-> add((n-j+1)^j, j=1..n): seq(a(n), n=0..30); # Zerinvary Lajos, Jun 07 2008
  • Mathematica
    Table[Sum[(n-k+1)^k,{k,n}],{n,0,25}] (* Harvey P. Dale, Aug 14 2011 *)
  • PARI
    a(n)=sum(k=1,n,(n-k+1)^k) \\ Charles R Greathouse IV, Oct 31 2011
    
  • SageMath
    def A003101(n): return sum( (n-k+1)^k for k in range(1,n+1))
    [A003101(n) for n in range(50)] # G. C. Greubel, Oct 26 2022

Formula

a(n) = A026898(n) - 1.
G.f.: G(0)/x-1/(1-x)/x where G(k) = 1 + x*(2*k*x-1)/((2*k*x+x-1) - x*(2*k*x+x-1)^2/(x*(2*k*x+x-1) + (2*k*x+2*x-1)/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Jan 26 2013
G.f.: Sum_{k>=1} x^k/(1 - (k + 1)*x). - Ilya Gutkovskiy, Oct 09 2018
a(n) = n^1 + (n-1)^2 + (n-2)^3 + ... + 3^(n-2) + 2^(n-1) + 1^n. - Bernard Schott, Jan 07 2019
log(a(n)) ~ (1 - 1/LambertW(exp(1)*n)) * n * log(1 + n/LambertW(exp(1)*n)). - Vaclav Kotesovec, Jun 15 2021
a(n) ~ sqrt(2*Pi/(n+1 + w(n))) * w(n)^(n+2 - w(n)), where w(n) = (n+1)/LambertW(exp(1)*(n+1)). - Vaclav Kotesovec, Jun 25 2021, after user "leonbloy", see Mathematics Stack Exchange link.

A009998 Triangle in which j-th entry in i-th row is (j+1)^(i-j).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 3, 1, 1, 8, 9, 4, 1, 1, 16, 27, 16, 5, 1, 1, 32, 81, 64, 25, 6, 1, 1, 64, 243, 256, 125, 36, 7, 1, 1, 128, 729, 1024, 625, 216, 49, 8, 1, 1, 256, 2187, 4096, 3125, 1296, 343, 64, 9, 1, 1, 512, 6561, 16384, 15625, 7776, 2401, 512, 81, 10, 1
Offset: 0

Views

Author

Keywords

Comments

Read as a square array this is the Hilbert transform of triangle A123125 (see A145905 for the definition of this term). For example, the fourth row of A123125 is (0,1,4,1) and the expansion (x + 4*x^2 + x^3)/(1-x)^4 = x + 8*x^2 + 27*x^3 + 64*x^4 + ... generates the entries in the fourth row of this array read as a square. - Peter Bala, Oct 28 2008

Examples

			Triangle begins:
  1;
  1,  1;
  1,  2,  1;
  1,  4,  3,  1;
  1,  8,  9,  4,  1;
  1, 16, 27, 16,  5,  1;
  1, 32, 81, 64, 25,  6,  1;
  ...
From _Gus Wiseman_, May 01 2021: (Start)
The rows of the triangle are obtained by reading antidiagonals upward in the following table of A(k,n) = n^k, with offset k = 0, n = 1:
         n=1:     n=2:     n=3:     n=4:     n=5:     n=6:
   k=0:   1        1        1        1        1        1
   k=1:   1        2        3        4        5        6
   k=2:   1        4        9       16       25       36
   k=3:   1        8       27       64      125      216
   k=4:   1       16       81      256      625     1296
   k=5:   1       32      243     1024     3125     7776
   k=6:   1       64      729     4096    15625    46656
   k=7:   1      128     2187    16384    78125   279936
   k=8:   1      256     6561    65536   390625  1679616
   k=9:   1      512    19683   262144  1953125 10077696
  k=10:   1     1024    59049  1048576  9765625 60466176
(End)
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 24.

Crossrefs

Row sums give A026898.
Column n = 2 of the array is A000079.
Column n = 3 of the array is A000244.
Row k = 2 of the array is A000290.
Row k = 3 of the array is A000578.
Diagonal n = k of the array is A000312.
Diagonal n = k + 1 of the array is A000169.
Diagonal n = k + 2 of the array is A000272.
The transpose of the array is A009999.
The numbers of divisors of the entries are A343656 (row sums: A343657).
A007318 counts k-sets of elements of {1..n}.
A059481 counts k-multisets of elements of {1..n}.

Programs

  • Haskell
    a009998 n k = (k + 1) ^ (n - k)
    a009998_row n = a009998_tabl !! n
    a009998_tabl = map reverse a009999_tabl
    -- Reinhard Zumkeller, Feb 02 2014
    
  • Maple
    E := (n,x) -> `if`(n=0,1,x*(1-x)*diff(E(n-1,x),x)+E(n-1,x)*(1+(n-1)*x));
    G := (n,x) -> E(n,x)/(1-x)^(n+1);
    A009998 := (n,k) -> coeff(series(G(n-k,x),x,18),x,k);
    seq(print(seq(A009998(n,k),k=0..n)),n=0..6);
    # Peter Luschny, Aug 02 2010
  • Mathematica
    Flatten[Table[(j+1)^(i-j),{i,0,20},{j,0,i}]] (* Harvey P. Dale, Dec 25 2012 *)
  • PARI
    T(i,j)=(j+1)^(i-j) \\ Charles R Greathouse IV, Feb 06 2017

Formula

T(n,n) = 1; T(n,k) = (k+1)*T(n-1,k) for k=0..n-1. - Reinhard Zumkeller, Feb 02 2014
T(n,m) = (m+1)*Sum_{k=0..n-m}((n+1)^(k-1)*(n-m)^(n-m-k)*(-1)^(n-m-k)*binomial(n-m-1,k-1)). - Vladimir Kruchinin, Sep 12 2015

Extensions

a(62) corrected to 512 by T. D. Noe, Dec 20 2007

A046802 T(n, k) = Sum_{j=k..n} binomial(n, j)*E1(j, j-k), where E1 are the Eulerian numbers A173018. Triangle read by rows, T(n, k) for 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 7, 7, 1, 1, 15, 33, 15, 1, 1, 31, 131, 131, 31, 1, 1, 63, 473, 883, 473, 63, 1, 1, 127, 1611, 5111, 5111, 1611, 127, 1, 1, 255, 5281, 26799, 44929, 26799, 5281, 255, 1, 1, 511, 16867, 131275, 344551, 344551, 131275, 16867, 511, 1, 1, 1023, 52905
Offset: 0

Views

Author

Keywords

Comments

T(n,k) is the number of positroid cells of the totally nonnegative Grassmannian G+(k,n) (cf. Postnikov/Williams). It is the triangle of the h-vectors of the stellahedra. - Tom Copeland, Oct 10 2014
See A248727 for a simple transformation of the row polynomials of this entry that produces the umbral compositional inverses of the polynomials of A074909, related to the face polynomials of the simplices. - Tom Copeland, Jan 21 2015
From Tom Copeland, Jan 24 2015: (Start)
The reciprocal of this entry's e.g.f. is [t e^(-xt) - e^(-x)] / (t-1) = 1 - (1+t) x + (1+t+t^2) x^2/2! - (1+t+t^2+t^3) x^3/3! + ... = e^(q.(0;t)x), giving the base sequence (q.(0;t))^n = q_n(0;t) = (-1)^n [1-t^(n+1)] / (1-t) for the umbral compositional inverses (q.(0;t)+z)^n = q_n(z;t) of the Appell polynomials associated with this entry, p_n(z;t) below, i.e., q_n(p.(z;t)) = z^n = p_n(q.(z;t)), in umbral notation. The relations in A133314 then apply between the two sets of base polynomials. (Inserted missing index in a formula - Mar 03 2016.)
The associated o.g.f. for the umbral inverses is Og(x) = x / (1-x q.(0:t)) = x / [(1+x)(1+tx)] = x / [1+(1+t)x+tx^2]. Applying A134264 to h(x) = x / Og(x) = 1 + (1+t) x + t x^2 leads to an o.g.f. for the Narayana polynomials A001263 as the comp. inverse Oginv(x) = [1-(1+t)x-sqrt[1-2(1+t)x+((t-1)x)^2]] / (2xt). Note that Og(x) gives the signed h-polynomials of the simplices and that Oginv(x) gives the h-polynomials of the simplicial duals of the Stasheff polynomials, or type A associahedra. Contrast this with A248727 = A046802 * A007318, which has o.g.f.s related to the corresponding f-polynomials. (End)
The Appell polynomials p_n(x;t) in the formulas below specialize to the Swiss-knife polynomials of A119879 for t = -1, so the Springer numbers A001586 are given by 2^n p_n(1/2;-1). - Tom Copeland, Oct 14 2015
The row polynomials are the h-polynomials associated to the stellahedra, whose f-polynomials are the row polynomials of A248727. Cf. page 60 of the Buchstaber and Panov link. - Tom Copeland, Nov 08 2016
The row polynomials are the h-polynomials of the stellohedra, which enumerate partial permutations according to descents. Cf. Section 10.4 of the Postnikov-Reiner-Williams reference. - Lauren Williams, Jul 05 2022
From p. 60 of the Buchstaber and Panov link, S = P * C / T where S, P, C, and T are the bivariate e.g.f.s of the h vectors of the stellahedra, permutahedra, hypercubes, and (n-1)-simplices, respectively. - Tom Copeland, Jan 09 2017
The number of Le-diagrams of type (k, n) this means the diagram uses the bounding box size k x (n-k), equivalently the number of Grassmann necklaces of type (k, n) and also the number of decorated permutations with k anti-exceedances. - Thomas Scheuerle, Dec 29 2024

Examples

			The triangle T(n, k) begins:
n\k 0   1     2      3      4      5      6     7
0:  1
1:  1   1
2:  1   3     1
3:  1   7     7      1
4:  1  15    33     15      1
5:  1  31   131    131     31      1
6:  1  63   473    883    473     63      1
7:  1 127  1611   5111   5111   1611    127     1
... Reformatted. - _Wolfdieter Lang_, Feb 14 2015
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, Holland, 1974, page 245 [From Roger L. Bagula, Nov 21 2009]
  • D. Singh, The numbers L(m,n) and their relations with prepared Bernoulli and Eulerian numbers, Math. Student, 20 (1952), 66-70.

Crossrefs

Programs

  • Maple
    T := (n, k) -> add(binomial(n, r)*combinat:-eulerian1(r, r-k), r = k .. n):
    for n from 0 to 8 do seq(T(n, k), k=0..n) od; # Peter Luschny, Jun 27 2018
  • Mathematica
    t[, 1] = 1; t[n, n_] = 1; t[n_, 2] = 2^(n-1)-1;
    t[n_, k_] = Sum[((i-k+1)^i*(k-i)^(n-i-1) - (i-k+2)^i*(k-i-1)^(n-i-1))*Binomial[n-1, i], {i, 0, k-1}];
    T[n_, k_] := t[n+1, k+1]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten
    (* Jean-François Alcover, Jan 22 2015, after Tom Copeland *)
    T[ n_, k_] := Coefficient[n! SeriesCoefficient[(1-x) Exp[t] / (1 - x Exp[(1-x) t]), {t, 0, n}] // Simplify, x, k];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] (* Michael Somos, Jan 22 2015 *)

Formula

E.g.f.: (y-1)*exp(x*y)/(y-exp((y-1)*x)). - Vladeta Jovovic, Sep 20 2003
p(t,x) = (1 - x)*exp(t)/(1 - x*exp(t*(1 - x))). - Roger L. Bagula, Nov 21 2009
With offset=0, T(n,0)=1 otherwise T(n,k) = sum_{i=0..k-1} C(n,i)((i-k)^i*(k-i+1)^(n-i) - (i-k+1)^i*(k-i)^(n-i)) (cf. Williams). - Tom Copeland, Oct 10 2014
With offset 0, T = A007318 * A123125. Second column is A000225; 3rd, appears to be A066810. - Tom Copeland, Jan 23 2015
A raising operator (with D = d/dx) associated with this entry's row polynomials is R = x + t + (1-t) / [1-t e^{(1-t)D}] = x + t + 1 + t D + (t+t^2) D^2/2! + (t+4t^2+t^3) D^3/3! + ... , containing the e.g.f. for the Eulerian polynomials of A123125. Then R^n 1 = (p.(0;t)+x)^n = p_n(x;t) are the Appell polynomials with this entry's row polynomials p_n(0;t) as the base sequence. Examples of this formalism are given in A028246 and A248727. - Tom Copeland, Jan 24 2015
With offset 0, T = A007318*(padded A090582)*(inverse of A097805) = A007318*(padded A090582)*(padded A130595) = A007318*A123125 = A007318*(padded A090582)*A007318*A097808*A130595, where padded matrices are of the form of padded A007318, which is A097805. Inverses of padded matrices are just the padded versions of inverses of the unpadded matrices. This relates the face vectors, or f-vectors, and h-vectors of the permutahedra / permutohedra to those of the stellahedra / stellohedra. - Tom Copeland, Nov 13 2016
Umbrally, the row polynomials (offset 0) are r_n(x) = (1 + q.(x))^n, where (q.(x))^k = q_k(x) are the row polynomials of A123125. - Tom Copeland, Nov 16 2016
From the previous umbral statement, OP(x,d/dy) y^n = (y + q.(x))^n, where OP(x,y) = exp[y * q.(x)] = (1-x)/(1-x*exp((1-x)y)), the e.g.f. of A123125, so OP(x,d/dy) y^n evaluated at y = 1 is r_n(x), the n-th row polynomial of this entry, with offset 0. - Tom Copeland, Jun 25 2018
Consolidating some formulas in this entry and A248727, in umbral notation for concision, with all offsets 0: Let A_n(x;y) = (y + E.(x))^n, an Appell sequence in y where E.(x)^k = E_k(x) are the Eulerian polynomials of A123125. Then the row polynomials of this entry (A046802, the h-polynomials of the stellahedra) are given by h_n(x) = A_n(x;1); the row polynomials of A248727 (the face polynomials of the stellahedra), by f_n(x) = A_n(1 + x;1); the Swiss-knife polynomials of A119879, by Sw_n(x) = A_n(-1;1 + x); and the row polynomials of the Worpitsky triangle (A130850), by w_n(x) = A(1 + x;0). Other specializations of A_n(x;y) give A090582 (the f-polynomials of the permutohedra, cf. also A019538) and A028246 (another version of the Worpitsky triangle). - Tom Copeland, Jan 24 2020
From Peter Luschny, Apr 30 2021: (Start)
Sum_{k=0..n} (-1)^k*T(n, k) = A122045(n).
Sum_{k=0..n} 2^(n-k)*T(n,k) = A007047(n).
Sum_{k=0..n} T(n, n-k) = A000522(n).
Sum_{k=0..n} T(n-k, k) = Sum_{k=0..n} (n - k)^k = A026898(n-1) for n >= 1.
Sum_{k=0..n} k*T(n, k) = A036919(n) = floor(n*n!*e/2).
(End)

Extensions

More terms from Vladeta Jovovic, Sep 20 2003
First formula corrected by Wolfdieter Lang, Feb 14 2015
Offset set to 0 and edited by Peter Luschny, Apr 30 2021

A003992 Square array read by upwards antidiagonals: T(n,k) = n^k for n >= 0, k >= 0.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 4, 1, 0, 1, 4, 9, 8, 1, 0, 1, 5, 16, 27, 16, 1, 0, 1, 6, 25, 64, 81, 32, 1, 0, 1, 7, 36, 125, 256, 243, 64, 1, 0, 1, 8, 49, 216, 625, 1024, 729, 128, 1, 0, 1, 9, 64, 343, 1296, 3125, 4096, 2187, 256, 1, 0, 1, 10, 81, 512, 2401, 7776, 15625, 16384, 6561, 512, 1, 0
Offset: 0

Views

Author

Keywords

Comments

If the array is transposed, T(n,k) is the number of oriented rows of n colors using up to k different colors. The formula would be T(n,k) = [n==0] + [n>0]*k^n. The generating function for column k would be 1/(1-k*x). For T(3,2)=8, the rows are AAA, AAB, ABA, ABB, BAA, BAB, BBA, and BBB. - Robert A. Russell, Nov 08 2018
T(n,k) is the number of multichains of length n from {} to [k] in the Boolean lattice B_k. - Geoffrey Critzer, Apr 03 2020

Examples

			Rows begin:
[1, 0,  0,   0,    0,     0,      0,      0, ...],
[1, 1,  1,   1,    1,     1,      1,      1, ...],
[1, 2,  4,   8,   16,    32,     64,    128, ...],
[1, 3,  9,  27,   81,   243,    729,   2187, ...],
[1, 4, 16,  64,  256,  1024,   4096,  16384, ...],
[1, 5, 25, 125,  625,  3125,  15625,  78125, ...],
[1, 6, 36, 216, 1296,  7776,  46656, 279936, ...],
[1, 7, 49, 343, 2401, 16807, 117649, 823543, ...], ...
		

Crossrefs

Main diagonal is A000312. Other diagonals include A000169, A007778, A000272, A008788. Antidiagonal sums are in A026898.
Cf. A099555.
Transpose is A004248. See A051128, A095884, A009999 for other versions.
Cf. A277504 (unoriented), A293500 (chiral).

Programs

  • Magma
    [[(n-k)^k: k in [0..n]]: n in [0..10]]; // G. C. Greubel, Nov 08 2018
  • Mathematica
    Table[If[k == 0, 1, (n - k)^k], {n, 0, 11}, {k, 0, n}]//Flatten
  • PARI
    T(n,k) = (n-k)^k \\ Charles R Greathouse IV, Feb 07 2017
    

Formula

E.g.f.: Sum T(n,k)*x^n*y^k/k! = 1/(1-x*exp(y)). - Paul D. Hanna, Oct 22 2004
E.g.f.: Sum T(n,k)*x^n/n!*y^k/k! = e^(x*e^y). - Franklin T. Adams-Watters, Jun 23 2006

Extensions

More terms from David W. Wilson
Edited by Paul D. Hanna, Oct 22 2004

A047970 Antidiagonal sums of nexus numbers (A047969).

Original entry on oeis.org

1, 2, 5, 14, 43, 144, 523, 2048, 8597, 38486, 182905, 919146, 4866871, 27068420, 157693007, 959873708, 6091057009, 40213034874, 275699950381, 1959625294310, 14418124498211, 109655727901592, 860946822538675, 6969830450679864, 58114638923638573
Offset: 0

Views

Author

Alford Arnold, Dec 11 1999

Keywords

Comments

From Lara Pudwell, Oct 23 2008: (Start)
A permutation p avoids a pattern q if it has no subsequence that is order-isomorphic to q. For example, p avoids the pattern 132 if it has no subsequence abc with a < c < b.
Barred pattern avoidance considers permutations that avoid a pattern except in a special case. Given a barred pattern q, we may form two patterns, q1 = the sequence of unbarred letters of q and q2 = the sequence of all letters of q.
A permutation p avoids barred pattern q if every instance of q1 in p is embedded in a copy of q2 in p. In other words, p avoids q1, except in the special case that a copy of q1 is a subsequence of a copy of q2.
For example, if q=5{bar 1}32{bar 4}, then q1=532 and q2 = 51324. p avoids q if every for decreasing subsequence acd of length 3 in p, one can find letters b and e so that the subsequence abcde of p has b < d < c < e < a. (End)
Number of ordered factorizations over the Gaussian polynomials.
Apparently, also the number of permutations in S_n avoiding {bar 3}{bar 1}542 (i.e., every occurrence of 542 is contained in an occurrence of a 31542). - Lara Pudwell, Apr 25 2008
With offset 1, apparently the number of sequences {b(m)} of length n of positive integers with b(1) = 1 and, for all m > 1, b(m) <= max{b(m-1) + 1, max{b(i) | 1 <= i <= m - 1}}. This sequence begins 1, 2, 5, 14, 43, 144, 523, 2048, 8597, 38486. The term 144 counts the length 6 sequence 1, 2, 3, 1, 1, 3, for instance. Contrast with the families of sequences discussed in Franklin T. Adams-Watters's comment in A005425. - Rick L. Shepherd, Jan 01 2015
a(n-1) for n >= 1 is the number of length-n restricted growth strings (RGS) [s(0), s(1), ..., s(n-1)] with s(0)=0 and s(k) <= the number of fixed points in the prefix, see example. - Joerg Arndt, Mar 08 2015
Number of sequences (e(1), ..., e(n+1)), 0 <= e(i) < i, such that there is no triple i < j < k with e(i) != e(j) = e(k). [Martinez and Savage, 2.15] - Eric M. Schmidt, Jul 17 2017
a(n) counts all positive-integer m-tuples whose maximum is n-m+2. - Mathew Englander, Feb 28 2021
a(n) counts the cyclic permutations of [n+2] that avoid the vincular pattern 12-3-4, i.e., the pattern 1234 where the 1 and 2 are required to be adjacent. - Rupert Li, Jul 27 2021

Examples

			a(3) = 1 + 5 + 7 + 1 = 14.
From _Paul D. Hanna_, Jul 22 2014:  (Start)
G.f. A(x) = 1 + 2*x + 5*x^2 + 14*x^3 + 43*x^4 + 144*x^5 + 523*x^6 + 2048*x^7 + ...
where we have the series identity:
A(x) = (1-x)*( 1/(1-2*x) + x/(1-3*x) + x^2/(1-4*x) + x^3/(1-5*x) + x^4/(1-6*x) + x^5/(1-7*x) + x^6/(1-8*x) + ...)
is equal to
A(x) = 1/(1-x) + x/((1-x)*(1-2*x)) + x^2/((1-2*x)*(1-3*x)) + x^3/((1-3*x)*(1-4*x)) + x^4/((1-4*x)*(1-5*x)) + x^5/((1-5*x)*(1-6*x)) + x^6/((1-6*x)*(1-7*x)) + ...
and also equals
A(x) = 1/((1-x)*(1+x)) + 2!*x/((1-x)^2*(1+x)*(1+2*x)) + 3!*x^2/((1-x)^3*(1+x)*(1+2*x)*(1+3*x)) + 4!*x^3/((1-x)^4*(1+x)*(1+2*x)*(1+3*x)*(1+4*x)) + ...
(End)
From _Joerg Arndt_, Mar 08 2015: (Start)
There are a(4-1)=14 length-4 RGS as in the comment (dots denote zeros):
01:  [ . . . . ]
02:  [ . . . 1 ]
03:  [ . . 1 . ]
04:  [ . . 1 1 ]
05:  [ . 1 . . ]
06:  [ . 1 . 1 ]
07:  [ . 1 . 2 ]
08:  [ . 1 1 . ]
09:  [ . 1 1 1 ]
10:  [ . 1 1 2 ]
11:  [ . 1 2 . ]
12:  [ . 1 2 1 ]
13:  [ . 1 2 2 ]
14:  [ . 1 2 3 ]
(End)
		

Crossrefs

Antidiagonal sums of A085388 (beginning with the second antidiagonal) and A047969.
Partial sums are in A026898, A003101. First differences A112532.

Programs

  • Maple
    T := proc(n, k) option remember; local j;
        if k=n then 1
      elif k>n then 0
      else (k+1)*T(n-1, k) + add(T(n-1, j), j=k..n)
        fi end:
    A047970 := n -> T(n,0);
    seq(A047970(n), n=0..24); # Peter Luschny, May 14 2014
  • Mathematica
    a[ n_] := SeriesCoefficient[ ((1 - x) Sum[ x^k / (1 - (k + 2) x), {k, 0, n}]), {x, 0, n}]; (* Michael Somos, Jul 09 2014 *)
  • PARI
    /* From o.g.f. (Paul D. Hanna, Jul 20 2014) */
    {a(n)=polcoeff( sum(m=0, n, (m+1)!*x^m/(1-x)^(m+1)/prod(k=1, m+1, 1+k*x +x*O(x^n))), n)}
    for(n=0, 25, print1(a(n), ", "))
    
  • PARI
    /* From o.g.f. (Paul D. Hanna, Jul 22 2014) */
    {a(n)=polcoeff( sum(m=0, n, x^m/((1-m*x)*(1-(m+1)*x +x*O(x^n)))), n)}
    for(n=0, 25, print1(a(n), ", "))
  • Sage
    def A074664():
        T = []; n = 0
        while True:
            T.append(1)
            yield T[0]
            for k in (0..n):
                T[k] = (k+1)*T[k] + add(T[j] for j in (k..n))
            n += 1
    a = A074664()
    [next(a) for n in range(25)] # Peter Luschny, May 13 2014
    

Formula

Formal o.g.f.: (1 - x)*( Sum_{n >= 0} x^n/(1 - (n + 2)*x) ). - Peter Bala, Jul 09 2014
O.g.f.: Sum_{n>=0} (n+1)! * x^n/(1-x)^(n+1) / Product_{k=1..n+1} (1 + k*x). - Paul D. Hanna, Jul 20 2014
O.g.f.: Sum_{n>=0} x^n / ( (1 - n*x) * (1 - (n+1)*x) ). - Paul D. Hanna, Jul 22 2014
From Mathew Englander, Feb 28 2021: (Start)
a(n) = A089246(n+2,0) = A242431(n,0).
a(n) = Sum_{m = 1..n+1} Sum_{i = 0..m-1} binomial(m,i) * (n-m+1)^i.
a(n) = 1 + Sum_{i = 0..n} i * (i+1)^(n-i). (End)
a(n) ~ sqrt(2*Pi*n / (w*(1+w))) * (1 + n/w)^(1 + n - n/w), where w = LambertW(exp(1)*n). - Vaclav Kotesovec, Jun 10 2025

A004248 Array read by ascending antidiagonals: A(n, k) = k^n.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 4, 3, 1, 0, 1, 8, 9, 4, 1, 0, 1, 16, 27, 16, 5, 1, 0, 1, 32, 81, 64, 25, 6, 1, 0, 1, 64, 243, 256, 125, 36, 7, 1, 0, 1, 128, 729, 1024, 625, 216, 49, 8, 1, 0, 1, 256, 2187, 4096, 3125, 1296, 343, 64, 9, 1, 0, 1, 512, 6561, 16384, 15625, 7776, 2401, 512, 81, 10, 1
Offset: 0

Views

Author

Keywords

Comments

This array transforms into A371761 using the Akiyama-Tanigawa algorithm for powers applied to the rows. - Peter Luschny, Apr 16 2024
This array transforms into A344499 using the Akiyama-Tanigawa algorithm for powers applied to the columns. - Peter Luschny, Apr 27 2024

Examples

			Seen as an array that is read by ascending antidiagonals:
[0] 1, 1,   1,    1,     1,     1,      1,      1,       1, ...
[1] 0, 1,   2,    3,     4,     5,      6,      7,       8, ...
[2] 0, 1,   4,    9,    16,    25,     36,     49,      64, ...
[3] 0, 1,   8,   27,    64,   125,    216,    343,     512, ...
[4] 0, 1,  16,   81,   256,   625,   1296,   2401,    4096, ...
[5] 0, 1,  32,  243,  1024,  3125,   7776,  16807,   32768, ...
[6] 0, 1,  64,  729,  4096, 15625,  46656, 117649,  262144, ...
[7] 0, 1, 128, 2187, 16384, 78125, 279936, 823543, 2097152, ...
		

Crossrefs

For other versions see A051129 and A009998.
Row sums are A026898, diagonal sums are A104872. [Paul Barry, Mar 28 2005]

Programs

  • Mathematica
    T[x_, y_] := If[y == 0, 1, (x - y)^y];
    Table[T[x, y], {x, 0, 11}, {y, x, 0, -1}] // Flatten (* Jean-François Alcover, Dec 15 2017 *)
  • PARI
    T(x, y) = x^y \\ Charles R Greathouse IV, Feb 07 2017
    
  • SageMath
    def Arow(n, len): return [k**n for k in range(len)]
    for n in range(8): print([n], Arow(n, 9))  # Peter Luschny, Apr 16 2024

Formula

Table of x^y, where (x,y) = (0,0), (0,1), (1,0), (0,2), (1,1), (2,0), ...
As a number triangle, columns have g.f. x^k/(1 - kx). - Paul Barry, Mar 28 2005
From Paul Barry, Jul 13 2005: (Start)
T(n, k) = if(k <= n, k^(n - k), 0).
T(n, k) = Sum_{j=0..floor((n-k)/2)} (-1)^j*C(n-k, j)*C(n-k-j, n-k)*k^(n-k-2j).
(End)

Extensions

New name by Peter Luschny, Apr 16 2024.

A354436 a(n) = n! * Sum_{k=0..n} k^(n-k)/k!.

Original entry on oeis.org

1, 1, 3, 13, 85, 801, 10231, 168253, 3437673, 85162465, 2511412651, 86805640461, 3469622549053, 158523442439233, 8198514736542495, 476003264246418301, 30804251925861439441, 2207978115389469465153, 174304316334466458575443
Offset: 0

Views

Author

Seiichi Manyama, May 28 2022

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{1}, Table[n!*Sum[k^(n-k)/k!, {k, 0, n}], {n, 1, 20}]] (* Vaclav Kotesovec, May 28 2022 *)
  • PARI
    a(n) = n!*sum(k=0, n, k^(n-k)/k!);
    
  • PARI
    my(N=20, x='x+O('x^N)); Vec(serlaplace(sum(k=0, N, x^k/(k!*(1-k*x)))))
    
  • Python
    from math import factorial
    def A354436(n): return sum(factorial(n)*k**(n-k)//factorial(k) for k in range(n+1)) # Chai Wah Wu, May 28 2022

Formula

E.g.f.: Sum_{k>=0} x^k / (k! * (1 - k*x)).
a(n) ~ sqrt(Pi) * exp((2*n-1)/(2*LambertW(exp(1/2)*(2*n-1)/4)) - 2*n) * n^(2*n + 1/2) / (sqrt(1 + LambertW(exp(1/2)*(2*n-1)/4)) * 2^n * LambertW(exp(1/2)*(2*n-1)/4)^n). - Vaclav Kotesovec, May 28 2022
a(n) = Sum_{k=0..n} (n-k)^k*k!*binomial(n,k). - Ridouane Oudra, Jun 17 2025

A287216 Number A(n,k) of set partitions of [n] such that all absolute differences between least elements of consecutive blocks are <= k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 4, 1, 1, 1, 2, 5, 9, 1, 1, 1, 2, 5, 14, 23, 1, 1, 1, 2, 5, 15, 44, 66, 1, 1, 1, 2, 5, 15, 51, 152, 210, 1, 1, 1, 2, 5, 15, 52, 191, 571, 733, 1, 1, 1, 2, 5, 15, 52, 202, 780, 2317, 2781, 1, 1, 1, 2, 5, 15, 52, 203, 857, 3440, 10096, 11378, 1
Offset: 0

Views

Author

Alois P. Heinz, May 21 2017

Keywords

Examples

			A(4,0) = 1: 1234.
A(4,1) = 9: 1234, 134|2, 13|24, 14|23, 1|234, 14|2|3, 1|24|3, 1|2|34, 1|2|3|4.
A(4,2) = 14: 1234, 124|3, 12|34, 12|3|4, 134|2, 13|24, 13|2|4, 14|23, 1|234, 1|23|4, 14|2|3, 1|24|3, 1|2|34, 1|2|3|4.
A(5,1) = 23: 12345, 1345|2, 134|25, 135|24, 13|245, 145|23, 14|235, 15|234, 1|2345, 145|2|3, 14|25|3, 14|2|35, 15|24|3, 1|245|3, 1|24|35, 15|2|34, 1|25|34, 1|2|345, 15|2|3|4, 1|25|3|4, 1|2|35|4, 1|2|3|45, 1|2|3|4|5.
Square array A(n,k) begins:
  1,   1,   1,   1,   1,   1,   1,   1, ...
  1,   1,   1,   1,   1,   1,   1,   1, ...
  1,   2,   2,   2,   2,   2,   2,   2, ...
  1,   4,   5,   5,   5,   5,   5,   5, ...
  1,   9,  14,  15,  15,  15,  15,  15, ...
  1,  23,  44,  51,  52,  52,  52,  52, ...
  1,  66, 152, 191, 202, 203, 203, 203, ...
  1, 210, 571, 780, 857, 876, 877, 877, ...
		

Crossrefs

Columns k=0-10 give: A000012, A026898(n-1) for n>0, A287252, A287253, A287254, A287255, A287256, A287257, A287258, A287259, A287260.
Main diagonal gives A000110.

Programs

  • Maple
    b:= proc(n, k, m, l) option remember; `if`(n<1, 1,
         `if`(l-n>k, 0, b(n-1, k, m+1, n))+m*b(n-1, k, m, l))
        end:
    A:= (n, k)-> b(n-1, min(k, n-1), 1, n):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    b[n_, k_, m_, l_] := b[n, k, m, l] = If[n < 1, 1, If[l - n > k, 0, b[n - 1, k, m + 1, n]] + m*b[n - 1, k, m, l]];
    A[n_, k_] := b[n - 1, Min[k, n - 1], 1, n];
    Table[A[n, d - n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Apr 30 2018, after Alois P. Heinz *)

Formula

A(n,k) = Sum_{j=0..k} A287215(n,j).

A009999 Triangle in which j-th entry in i-th row is (i+1-j)^j, 0<=j<=i.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 4, 1, 1, 4, 9, 8, 1, 1, 5, 16, 27, 16, 1, 1, 6, 25, 64, 81, 32, 1, 1, 7, 36, 125, 256, 243, 64, 1, 1, 8, 49, 216, 625, 1024, 729, 128, 1, 1, 9, 64, 343, 1296, 3125, 4096, 2187, 256, 1, 1, 10, 81, 512, 2401, 7776, 15625, 16384, 6561, 512, 1
Offset: 0

Views

Author

Keywords

Comments

T(n,k) is the number of ways of placing 1..k in n boxes such that each box contains at most one number, and numbers in adjacent boxes are in increasing order. This can be proved by observing that there are n-(k-1) ways of extending each of T(n-1,k-1). - Jimin Park, Apr 16 2023
The n-th diagonal consists of n^k. This can also be generated as the Akiyama-Tanigawa algorithm applied to the sequence binomial(n+k,k). - Shel Kaphan, May 03 2024

Examples

			Triangle begins
  1
  1  1
  1  2  1
  1  3  4   1
  1  4  9   8    1
  1  5 16  27   16    1
  1  6 25  64   81   32     1
  1  7 36 125  256  243    64     1
  1  8 49 216  625 1024   729   128    1
  1  9 64 343 1296 3125  4096  2187  256   1
  1 10 81 512 2401 7776 15625 16384 6561 512 1
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 24.

Crossrefs

Row sums give A026898.
T(2n,n) gives A000169(n+1).
Cf. A009998 (mirrored).

Programs

  • Haskell
    a009999 n k = (n + 1 - k) ^ k
    a009999_row n = a009999_tabl !! n
    a009999_tabl = [1] : map snd (iterate f ([1,1], [1,1])) where
       f (us@(u:_), vs) = (us', 1 : zipWith (*) us' vs)
                          where us' = (u + 1) : us
    -- Reinhard Zumkeller, Feb 02 2014
  • Maple
    A009999 := proc(i,j) (i+1-j)^j ; end proc: # R. J. Mathar, Jan 16 2011
  • Mathematica
    Table[(i+1-j)^j, {i, 0, 10}, {j, 0, i}] // Flatten (* Jean-François Alcover, Jan 14 2014 *)

Formula

T(n,0) = 1; T(n,k) = (n-k+1)*T(n-1,k-1) for k=1..n. - Reinhard Zumkeller, Feb 02 2014
T(n,k) = Sum_{i=0..k} binomial(k,i)*T(n-1-i,k-i). - Jimin Park, Apr 16 2023

Extensions

T(10,8) corrected by Reinhard Zumkeller, Feb 02 2014

A101494 Triangle, read by rows, where T(n,k) = Sum_{j=0..n-k-1} C(j+k,j)*T(n-1,j+k) for n>k>=0 with T(n,n)=1.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 4, 3, 1, 1, 9, 8, 4, 1, 1, 23, 23, 13, 5, 1, 1, 66, 73, 44, 19, 6, 1, 1, 210, 253, 162, 73, 26, 7, 1, 1, 733, 948, 643, 302, 111, 34, 8, 1, 1, 2781, 3817, 2724, 1337, 506, 159, 43, 9, 1, 1, 11378, 16433, 12259, 6266, 2457, 788, 218, 53, 10, 1, 1, 49864, 75295
Offset: 0

Views

Author

Paul D. Hanna, Jan 21 2005

Keywords

Comments

Column 0 equals row sums (A026898) shift right.
T(n,k) is the number of m-tuples of nonnegative integers satisfying these two criteria: (i) there are exactly k 0’s, and (ii) the remaining m-k elements are positive integers less than or equal to n-m. - Mathew Englander, Feb 25 2021

Examples

			4th row sum = 23 = (5-0)^0+(5-1)^1+(5-2)^2+(5-3)^3+(5-4)^4.
5th row sum = 66 = (6-0)^0+(6-1)^1+(6-2)^2+(6-3)^3+(6-4)^4+(6-5)^5.
T(6,0) = 66 = 1*23 + 1*23 + 1*13 + 1*5 + 1*1 + 1*1.
T(6,1) = 73 = 1*23 + 2*13 + 3*5 + 4*1 + 5*1.
T(6,2) = 44 = 1*13 + 3*5 + 6*1 + 10*1.
Rows begin:
1;
1, 1;
2, 1, 1;
4, 3, 1, 1;
9, 8, 4, 1, 1;
23, 23, 13, 5, 1, 1;
66, 73, 44, 19, 6, 1, 1;
210, 253, 162, 73, 26, 7, 1, 1;
733, 948, 643, 302, 111, 34, 8, 1, 1;
2781, 3817, 2724, 1337, 506, 159, 43, 9, 1, 1;
11378, 16433, 12259, 6266, 2457, 788, 218, 53, 10, 1, 1;
49864, 75295, 58423, 30953, 12558, 4147, 1163, 289, 64, 11, 1, 1;
232769, 365600, 293902, 160823, 67259, 22878, 6574, 1647, 373, 76, 12, 1, 1; ...
		

Crossrefs

Cf. A101495, A026898, A089246 (first differences by column), A304357 (antidiagonal sums, empirically), A034856 (fourth diagonal).

Programs

  • GAP
    Flat(List([0..10],n->List([0..n],k->Sum([0..n-k],j->Binomial(j+k,j)*(n-k-j)^j)))); # Muniru A Asiru, Mar 07 2019
  • PARI
    T(n,k)=if(n
    				
  • PARI
    T(n,k)=polcoeff(sum(m=0,n-k, x^m/(1-m*x +x*O(x^(n-k)))^(k+1)),n-k)
    for(n=0,12,for(k=0,n,print1(T(n,k),", "));print()) \\ Paul D. Hanna, Mar 06 2013
    

Formula

T(n,0) = A026898(n-1).
T(n,k) = Sum_{j=0..n-k} binomial(j+k,j)*(n-k-j)^j. - Vladeta Jovovic, Sep 07 2006
G.f.: A(x,y) = Sum_{n>=0} Sum_{k>=0} x^(n+k)*y^k / (1 - n*x)^(k+1). - Paul D. Hanna, Mar 06 2013
From Mathew Englander, Feb 25 2021: (Start)
G.f. of row n: Sum_{i=0..n} (x+n-i)^i.
T(n,k) = Sum_{j=k..n} A089246(j,k).
Antidiagonal sums: Sum_{j = 0..n} Sum_{i = j..floor((n+j)/2)} binomial(i,j)*(n+j-2*i)^j. (End)
Showing 1-10 of 45 results. Next