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

A059260 Triangle read by rows giving coefficient T(i,j) of x^i y^j in 1/(1-y-x*y-x^2) = 1/((1+x)(1-x-y)) for (i,j) = (0,0), (1,0), (0,1), (2,0), (1,1), (0,2), ...

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 0, 2, 2, 1, 1, 2, 4, 3, 1, 0, 3, 6, 7, 4, 1, 1, 3, 9, 13, 11, 5, 1, 0, 4, 12, 22, 24, 16, 6, 1, 1, 4, 16, 34, 46, 40, 22, 7, 1, 0, 5, 20, 50, 80, 86, 62, 29, 8, 1, 1, 5, 25, 70, 130, 166, 148, 91, 37, 9, 1, 0, 6, 30, 95, 200, 296, 314, 239, 128, 46, 10, 1
Offset: 0

Views

Author

N. J. A. Sloane, Jan 23 2001

Keywords

Comments

Coefficients of the (left, normalized) shifted cyclotomic polynomial. Or, coefficients of the basic n-th q-series for q=-2. Indeed, let Y_n(x) = Sum_{k=0..n} x^k, having as roots all the n-th roots of unity except for 0; then coefficients in x of (-1)^n Y_n(-x-1) give exactly the n-th row of A059260 and a practical way to compute it. - Olivier Gérard, Jul 30 2002
The maximum in the (2n)-th row is T(n,n), which is A026641; also T(n,n) ~ (2/3)*binomial(2n,n). The maximum in the (2n-1)-th row is T(n-1,n), which is A014300 (but T does not have the same definition as in A026637); also T(n-1,n) ~ (1/3)*binomial(2n,n). Here is a generalization of the formula given in A026641: T(i,j) = Sum_{k=0..j} binomial(i+k-x,j-k)*binomial(j-k+x,k) for all x real (the proof is easy by induction on i+j using T(i,j) = T(i-1,j) + T(i,j-1)). - Claude Morin, May 21 2002
The second greatest term in the (2n)-th row is T(n-1,n+1), which is A014301; the second greatest term in the (2n+1)-th row is T(n+1,n) = 2*T(n-1,n+1), which is 2*A014301. - Claude Morin
Diagonal sums give A008346. - Paul Barry, Sep 23 2004
Riordan array (1/(1-x^2), x/(1-x)). As a product of Riordan arrays, factors into the product of (1/(1+x),x) and (1/(1-x),1/(1-x)) (binomial matrix). - Paul Barry, Oct 25 2004
Signed version is A239473 with relations to partial sums of sequences. - Tom Copeland, Mar 24 2014
From Robert Coquereaux, Oct 01 2014: (Start)
Columns of the triangle (cf. Example below) give alternate partial sums along nw-se diagonals of the Pascal triangle, i.e., sequences A000035, A004526, A002620 (or A087811), A002623 (or A173196), A001752, A001753, A001769, A001779, A001780, A001781, A001786, A001808, etc.
The dimension of the space of closed currents (distributional forms) of degree p on Gr(n), the Grassmann algebra with n generators, equivalently, the dimension of the space of Gr(n)-valued symmetric multilinear forms with vanishing graded divergence, is V(n,p) = 2^n T(p,n-1) - (-1)^p.
If p is odd V(n,p) is also the dimension of the cyclic cohomology group of order p of the Z2 graded algebra Gr(n).
If p is even the dimension of this cohomology group is V(n,p)+1.
Cf. A193844. (End)
From Peter Bala, Feb 07 2024: (Start)
The following remarks assume the row indexing starts at n = 1.
The sequence of row polynomials R(n,x), beginning R(1,x) = 1, R(2,x) = x, R(3,x) = 1 + x + x^2 , ..., is a strong divisibility sequence of polynomials in the ring Z[x]; that is, for all positive integers n and m, poly_gcd( R(n,x), R(m,x)) = R(gcd(n, m), x) - apply Norfleet (2005), Theorem 3. Consequently, the polynomial sequence {R(n,x): n >= 1} is a divisibility sequence; that is, if n divides m then R(n,x) divides R(m,x) in Z[x]. (End)
From Miquel A. Fiol, Oct 04 2024: (Start)
For j>=1, T(i,j) is the independence number of the (i-j)-supertoken graph FF_(i-j)(S_j) of the star graph S_j with j points.
(Given a graph G on n vertices and an integer k>=1, the k-supertoken (or reduced k-th power) FF_k(G) of G has vertices representing configurations of k indistinguishable tokens in the (not necessarily different) vertices of G, with two configurations being adjacent if one can be obtained from the other by moving one token along an edge. See an example below.)
Following the suggestion of Peter Munn, the k-supertoken graph FF_k(S_j) can also be defined as follows: Consider the Lattice graph L(k,j), whose vertices are the k^j j-vectors with elements in the set {0,..,k-1}, two being adjacent if they differ in just one coordinate by one unity. Then, FF_k(S_j) is the subgraph of L(k+1,j) induced by the vertices at distance at most k from (0,..,0). (End)

Examples

			Triangle begins
  1;
  0,  1;
  1,  1,  1;
  0,  2,  2,  1;
  1,  2,  4,  3,  1;
  0,  3,  6,  7,  4,  1;
  1,  3,  9, 13, 11,  5,  1;
  0,  4, 12, 22, 24, 16,  6,  1;
  1,  4, 16, 34, 46, 40, 22,  7,  1;
  0,  5, 20, 50, 80, 86, 62, 29,  8,  1;
Sequences obtained with _Miquel A. Fiol_'s Sep 30 2024 formula of A(n,c1,c2) for other values of (c1,c2). (In the table, rows are indexed by c1=0..6 and columns by c2=0..6):
A000007  A000012  A000027  A025747  A000292* A000332* A000389*
A059841  A008619  A087811* A002623  A001752  A001753  A001769
A193356  A008794* A005993  A005994  -------  -------  -------
-------  -------  -------  A005995  A018210  -------  A052267
-------  -------  -------  -------  A018211  A018212  -------
-------  -------  -------  -------  -------  A018213  A018214
-------  -------  -------  -------  -------  -------  A062136
*requires offset adjustment.
The 2-supertoken FF_2(S_3) of the star graph S_3 with central vertex 1 and peripheral vertices 2,3,4. (The vertex `ij' of FF_2(S_3) represents the configuration of one token in `ì' and the other token in `j'). The T(5,3)=7 independent vertices are 22, 24, 44, 23, 11, 34, and 33.
     22--12---24---14---44
          | \    / |
         23   11   34
            \  |  /
              13
               |
              33
		

Crossrefs

Cf. A059259. Row sums give A001045.
Seen as a square array read by antidiagonals this is the coefficient of x^k in expansion of 1/((1-x^2)*(1-x)^n) with rows A002620, A002623, A001752, A001753, A001769, A001779, A001780, A001781, A001786, A001808 etc. (allowing for signs). A058393 would then effectively provide the table for nonpositive n. - Henry Bottomley, Jun 25 2001

Programs

  • Maple
    read transforms; 1/(1-y-x*y-x^2); SERIES2(%,x,y,12); SERIES2TOLIST(%,x,y,12);
  • Mathematica
    t[n_, k_] := Sum[ (-1)^(n-j)*Binomial[j, k], {j, 0, n}]; Flatten[ Table[t[n, k], {n, 0, 12}, {k, 0, n}]] (* Jean-François Alcover, Oct 20 2011, after Paul Barry *)
  • PARI
    T(n, k) = sum(j=0, n, (-1)^(n - j)*binomial(j, k));
    for(n=0, 12, for(k=0, n, print1(T(n, k),", ");); print();) \\ Indranil Ghosh, Apr 11 2017
    
  • Python
    from sympy import binomial
    def T(n, k): return sum((-1)**(n - j)*binomial(j, k) for j in range(n + 1))
    for n in range(13): print([T(n, k) for k in range(n + 1)]) # Indranil Ghosh, Apr 11 2017
  • Sage
    def A059260_row(n):
        @cached_function
        def prec(n, k):
            if k==n: return 1
            if k==0: return 0
            return -prec(n-1,k-1)-sum(prec(n,k+i-1) for i in (2..n-k+1))
        return [(-1)^(n-k+1)*prec(n+1, n-k+1) for k in (1..n)]
    for n in (1..9): print(A059260_row(n)) # Peter Luschny, Mar 16 2016
    

Formula

G.f.: 1/(1-y-x*y-x^2) = 1 + y + x^2 + xy + y^2 + 2x^2y + 2xy^2 + y^3 + ...
E.g.f: (exp(-t)+(x+1)*exp((x+1)*t))/(x+2). - Tom Copeland, Mar 19 2014
O.g.f. (n-th row): ((-1)^n+(x+1)^(n+1))/(x+2). - Tom Copeland, Mar 19 2014
T(i, 0) = 1 if i is even or 0 if i is odd, T(0, i) = 1 and otherwise T(i, j) = T(i-1, j) + T(i, j-1); also T(i, j) = Sum_{m=j..i+j} (-1)^(i+j+m)*binomial(m, j). - Robert FERREOL, May 17 2002
T(i, j) ~ (i+j)/(2*i+j)*binomial(i+j, j); more precisely, abs(T(i, j)/binomial(i+j, j) - (i+j)/(2*i+j) )<=1/(4*(i+j)-2); the proof is by induction on i+j using the formula 2*T(i, j) = binomial(i+j, j)+T(i, j-1). - Claude Morin, May 21 2002
T(n, k) = Sum_{j=0..n} (-1)^(n-j)binomial(j, k). - Paul Barry, Aug 25 2004
T(n, k) = Sum_{j=0..n-k} binomial(n-j, j)*binomial(j, n-k-j). - Paul Barry, Jul 25 2005
Equals A097807 * A007318. - Gary W. Adamson, Feb 21 2007
Equals A128173 * A007318 as infinite lower triangular matrices. - Gary W. Adamson, Feb 17 2007
Equals A130595*A097805*A007318 = (inverse Pascal matrix)*(padded Pascal matrix)*(Pascal matrix) = A130595*A200139. Inverse is A097808 = A130595*(padded A130595)*A007318. - Tom Copeland, Nov 14 2016
T(i, j) = binomial(i+j, j)-T(i-1, j). - Laszlo Major, Apr 11 2017
Recurrence for row polynomials (with row indexing starting at n = 1): R(n,x) = x*R(n-1,x) + (x + 1)*R(n-2,x) with R(1,x) = 1 and R(2,x) = x. - Peter Bala, Feb 07 2024
From Miquel A. Fiol, Sep 30 2024: (Start)
The triangle can be seen as a slice of a 3-dimensional table that links it to well-known sequences as follows.
The j-th column of the triangle, T(i,j) for i >= j, equals A(n,c1,c2) = Sum_{k=0..floor(n/2)} binomial(c1+2*k-1,2*k)*binomial(c2+n-2*k-1,n-2*k) when c1=1, c2=j, and n=i-j.
This gives T(i,j) = Sum_{k=0..floor((i-j)/2)} binomial(i-2*k-1, j-1). For other values of (c1,c2), see the example below. (End)

Extensions

Formula corrected by Philippe Deléham, Jan 11 2014

A274537 Number T(n,k) of set partitions of [n] into k blocks such that each element is contained in a block whose index parity coincides with the parity of the element; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 3, 2, 1, 0, 0, 1, 3, 7, 2, 1, 0, 0, 1, 7, 14, 13, 3, 1, 0, 0, 1, 7, 35, 26, 22, 3, 1, 0, 0, 1, 15, 70, 113, 66, 34, 4, 1, 0, 0, 1, 15, 155, 226, 311, 102, 50, 4, 1, 0, 0, 1, 31, 310, 833, 933, 719, 200, 70, 5, 1
Offset: 0

Views

Author

Alois P. Heinz, Jun 27 2016

Keywords

Comments

All odd elements are in blocks with an odd index and all even elements are in blocks with an even index.

Examples

			T(6,2) = 1: 135|246.
T(6,3) = 3: 13|246|5, 15|246|3, 1|246|35.
T(6,4) = 7: 13|24|5|6, 15|24|3|6, 1|24|35|6, 15|26|3|4, 15|2|3|46, 1|26|35|4, 1|2|35|46.
T(6,5) = 2: 1|26|3|4|5, 1|2|3|46|5.
T(6,6) = 1: 1|2|3|4|5|6.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 0, 1;
  0, 0, 1,  1;
  0, 0, 1,  1,   1;
  0, 0, 1,  3,   2,   1;
  0, 0, 1,  3,   7,   2,   1;
  0, 0, 1,  7,  14,  13,   3,   1;
  0, 0, 1,  7,  35,  26,  22,   3,  1;
  0, 0, 1, 15,  70, 113,  66,  34,  4, 1;
  0, 0, 1, 15, 155, 226, 311, 102, 50, 4, 1;
  ...
		

Crossrefs

Row sums give A274538.
Columns k=0-10 give: A000007, A000007(n-1), A000012(n-2), A052551(n-3), A274868, A274869, A274870, A274871, A274872, A274873, A274874.
T(2n,n) gives A274875.
Main diagonal and lower diagonals give: A000012, A004526, A002623(n-2) or A173196.
Cf. A364267.

Programs

  • Maple
    b:= proc(n, m, t) option remember; `if`(n=0, x^m, add(
         `if`(irem(j, 2)=t, b(n-1, max(m, j), 1-t), 0), j=1..m+1))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 0, 1)):
    seq(T(n), n=0..12);
  • Mathematica
    b[n_, m_, t_] := b[n, m, t] = If[n==0, x^m, Sum[If[Mod[j, 2]==t, b[n-1, Max[m, j], 1-t], 0], {j, 1, m+1}]]; T[n_] := Function [p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, 0, 1]]; Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Dec 18 2016, after Alois P. Heinz *)

Formula

Sum_{k=0..n} k * T(n,k) = A364267(n). - Alois P. Heinz, Jul 16 2023

A239473 Triangle read by rows: signed version of A059260: coefficients for expansion of partial sums of sequences a(n,x) in terms of their binomial transforms (1+a(.,x))^n ; Laguerre polynomial expansion of the truncated exponential.

Original entry on oeis.org

1, 0, 1, 1, -1, 1, 0, 2, -2, 1, 1, -2, 4, -3, 1, 0, 3, -6, 7, -4, 1, 1, -3, 9, -13, 11, -5, 1, 0, 4, -12, 22, -24, 16, -6, 1, 1, -4, 16, -34, 46, -40, 22, -7, 1, 0, 5, -20, 50, -80, 86, -62, 29, -8, 1, 1, -5, 25, -70, 130, -166, 148, -91, 37, -9, 1, 0, 6, -30, 95, -200, 296, -314, 239, -128, 46, -10, 1
Offset: 0

Views

Author

Tom Copeland, Mar 19 2014

Keywords

Comments

With T the lower triangular array above and the Laguerre polynomials L(k,x) = Sum_{j=0..k} (-1)^j binomial(k, j) x^j/j!, the following identities hold:
(A) Sum_{k=0..n} (-1)^k L(k,x) = Sum_{k=0..n} T(n,k) x^k/k!;
(B) Sum_{k=0..n} x^k/k! = Sum_{k=0..n} T(n,k) L(k,-x);
(C) Sum_{k=0..n} x^k = Sum_{k=0..n} T(n,k) (1+x)^k = (1-x^(n+1))/(1-x).
More generally, for polynomial sequences,
(D) Sum_{k=0..n} P(k,x) = Sum_{k=0..n} T(n,k) (1+P(.,x))^k,
where, e.g., for an Appell sequence, such as the Bernoulli polynomials, umbrally, (1+ Ber(.,x))^k = Ber(k,x+1).
Identity B follows from A through umbral substitution of j!L(j,-x) for x^j in A. Identity C, related to the cyclotomic polynomials for prime index, follows from B through the Laplace transform.
Integrating C gives Sum_{k=0..n} T(n,k) (2^(k+1)-1)/(k+1) = H(n+1), the harmonic numbers.
Identity A >= 0 for x >= 0 (see MathOverflow link for evaluation in terms of Hermite polynomials).
From identity C, W(m,n) = (-1)^n Sum_{k=0..n} T(n,k) (2-m)^k = number of walks of length n+1 between any two distinct vertices of the complete graph K_m for m > 2.
Equals A112468 with the first column of ones removed. - Georg Fischer, Jul 26 2023

Examples

			Triangle begins:
   1
   0    1
   1   -1    1
   0    2   -2    1
   1   -2    4   -3    1
   0    3   -6    7   -4    1
   1   -3    9  -13   11   -5    1
   0    4  -12   22  -24   16   -6    1
   1   -4   16  -34   46  -40   22   -7    1
   0    5  -20   50  -80   86  -62   29   -8    1
   1   -5   25  -70  130 -166  148  -91   37   -9    1
		

Crossrefs

For column 2: A001057, A004526, A008619, A140106.
Column 3: A002620, A087811.
Column 4: A002623, A173196.
Column 5: A001752.
Column 6: A001753.
Cf. Bottomley's cross-references in A059260.
Embedded in alternating antidiagonals of T are the reversals of arrays A071921 (A225010) and A210220.

Programs

  • Magma
    [[(&+[(-1)^(j+k)*Binomial(j,k): j in [0..n]]): k in [0..n]]: n in [0..10]]; // G. C. Greubel, Feb 06 2018
    
  • Maple
    A239473 := proc(n,k)
        add(binomial(j,k)*(-1)^(j+k),j=k..n) ;
    end proc; # R. J. Mathar, Jul 21 2016
  • Mathematica
    Table[Sum[(-1)^(j+k)*Binomial[j,k], {j,0,n}], {n,0,10}, {k,0,n}]//Flatten (* G. C. Greubel, Feb 06 2018 *)
  • PARI
    for(n=0,10, for(k=0,n, print1(sum(j=0,n, (-1)^(j+k)*binomial(j, k)), ", "))) \\ G. C. Greubel, Feb 06 2018
    
  • Sage
    Trow = lambda n: sum((x-1)^j for j in (0..n)).list()
    for n in (0..10): print(Trow(n)) # Peter Luschny, Jul 09 2019

Formula

T(n, k) = Sum_{j=0..n} (-1)^(j+k) * binomial(j, k).
E.g.f: (exp(t) - (x-1)*exp((x-1)*t))/(2-x).
O.g.f. (n-th row): (1-(x-1)^(n+1))/(2-x).
Associated operator identities:
With D=d/dx, :xD:^n=x^n*D^n, and :Dx:^n=D^n*x^n, then bin(xD,n)= binomial(xD,n)=:xD:^n/n! and L(n,-:xD:)=:Dx:^n/n!=bin(xD+n,n)=(-1)^n bin(-xD-1,n),
A-o) Sum_{k=0..n} (-1)^k L(k,-:xD:) = Sum_{k=0..n} :-Dx:^k/k!
= Sum_{k=0..n} T(n,k) :-xD:^k/k! = Sum_{k=0..n} (-1)^k T(n,k)bin(xD,k)
B-o) Sum_{k=0..n} :xD:^k/k! = Sum_{k=0..n}, T(n,k) L(k,-:xD:)
= Sum_{k=0..n} T(n,k) :Dx:^k/k! = Sum_{k=0..n}, bin(xD,k).
Associated binomial identities:
A-b) Sum_{k=0..n} (-1)^k bin(s+k,k) = Sum_{k=0..n} (-1)^k T(n,k) bin(s,k)
= Sum_{k=0..n} bin(-s-1,k) = Sum{k=0..n} T(n,k) bin(-s-1+k,k)
B-b) Sum_{k=0..n} bin(s,k) = Sum_{k=0..n} T(n,k) bin(s+k,k)
= Sum_{k=0..n} (-1)^k bin(-s-1+k,k)
= Sum_{k=0..n} (-1)^k T(n,k) bin(-s-1,k).
In particular, from B-b with s=n, Sum_{k=0..n} T(n,k) bin(n+k,k) = 2^n. From B-b with s=0, row sums are all 1.
From identity C with x=-2, the unsigned row sums are the Jacobsthal sequence, i.e., Sum_{k=0..n} T(n,k) (1+(-2))^k = (-1)^n A001045(n+1); for x=2, the Mersenne numbers A000225; for x=-3, A014983 or signed A015518; for x=3, A003462; for x=-4, A014985 or signed A015521; for x=4, A002450; for x=-5, A014986 or signed A015531; and for x=5, A003463; for x=-6, A014987 or signed A015540; and for x=6, A003464.
With -s-1 = m = 0,1,2,..., B-b gives finite differences (recursions):
Sum_{k=0..n} (-1)^k T(n,k) bin(m,k) = Sum_{k=0..n} (-1)^k bin(m+k,k) = T(n+m,m), i.e., finite differences of the columns of T generate shifted columns of T. The columns of T are signed, shifted versions of sequences listed in the cross-references. Since the finite difference is an involution, T(n,k) = Sum_{j=0..k} (-1)^j T(n+j,j) bin(k,j)}. Gauss-Newton interpolation can be applied to give a generalized T(n,s) for s noninteger.
From identity C, S(n,m) = Sum_{k=0..n} T(n,k) bin(k,m) = 1 for m < n+1 and 0 otherwise, i.e., S = T*P, where S = A000012, as a lower triangular matrix and P = Pascal = A007318, so T = S*P^(-1), where P^(-1) = A130595, the signed Pascal array (see A132440), the inverse of P, and T^(-1) = P*S^(-1) = P*A167374 = A156644.
U(n,cos(x)) = e^(-n*i*x)*Sum_{k=0..n} T(n,k)*(1+e^(2*i*x))^k = sin((n+1)x)/sin(x), where U is the Chebyschev polynomial of the second kind A053117 and i^2 = -1. - Tom Copeland, Oct 18 2014
From Tom Copeland, Dec 26 2015: (Start)
With a(n,x) = e^(nx), the partial sums are 1+e^x+...+e^(nx) = Sum_{k=0..n} T(n,k) (1+e^x)^k = [ x / (e^x-1) ] [ e^((n+1)x) -1 ] / x = [ (x / (e^x-1)) e^((n+1)x) - (x / (e^x-1)) ] / x = Sum_{k>=0} [ (Ber(k+1,n+1) - Ber(k+1,0)) / (k+1) ] * x^k/k!, where Ber(n,x) are the Bernoulli polynomials (cf. Adams p. 140). Evaluating (d/dx)^m at x=0 of these expressions gives relations among the partial sums of the m-th powers of the integers, their binomial transforms, and the Bernoulli polynomials.
With a(n,x) = (-1)^n e^(nx), the partial sums are 1-e^x+...+(-1)^n e^(nx) = Sum_{k=0..n} T(n,k) (1-e^x)^k = [ (-1)^n e^((n+1)x) + 1 ] / (e^x+1) = [ (-1)^n (2 / (e^x+1)) e^((n+1)x) + (2 / (e^x+1)) ] / 2 = (1/2) Sum_{k>=0} [ (-1)^n Eul(k,n+1) + Eul(k,0) ] * x^k/k!, where Eul(n,x) are the Euler polynomials. Evaluating (d/dx)^m at x=0 of these expressions gives relations among the partial sums of signed m-th powers of the integers; their binomial transforms, related to the Stirling numbers of the second kind and face numbers of the permutahedra; and the Euler polynomials. (End)
As in A059260, a generator in terms of bivariate polynomials with the coefficients of this entry is given by (1/(1-y))*1/(1 + (y/(1-y))*x - (1/(1-y))*x^2) = 1 + y + (x^2 - x*y + y^2) + (2*x^2*y - 2*x*y^2 + y^3) + (x^4 - 2*x^3*y + 4*x^2*y^2 - 3*x*y^3 + y^4) + ... . This is of the form -h2 * 1 / (1 + h1*x + h2*x^2), related to the bivariate generator of A049310 with h1 = y/(1-y) and h2 = -1/(1-y) = -(1+h1). - Tom Copeland, Feb 16 2016
From Tom Copeland, Sep 05 2016: (Start)
Letting P(k,x) = x in D gives Sum_{k=0..n} T(n,k)*Sum_{j=0..k} binomial(k,j) = Sum_{k=0..n} T(n,k) 2^k = n + 1.
The quantum integers [n+1]q = (q^(n+1) - q^(-n-1)) / (q - q^(-1)) = q^(-n)*(1 - q^(2*(n+1))) / (1 - q^2) = q^(-n)*Sum{k=0..n} q^(2k) = q^(-n)*Sum_{k=0..n} T(n,k)*(1 + q^2)^k. (End)
T(n, k) = [x^k] Sum_{j=0..n} (x-1)^j. - Peter Luschny, Jul 09 2019
a(n) = -n + Sum_{k=0..n} A341091(k). - Thomas Scheuerle, Jun 17 2022

Extensions

Inverse array added by Tom Copeland, Mar 26 2014
Formula re Euler polynomials corrected by Tom Copeland, Mar 08 2024

A266677 Alternating sum of hexagonal pyramidal numbers.

Original entry on oeis.org

0, -1, 6, -16, 34, -61, 100, -152, 220, -305, 410, -536, 686, -861, 1064, -1296, 1560, -1857, 2190, -2560, 2970, -3421, 3916, -4456, 5044, -5681, 6370, -7112, 7910, -8765, 9680, -10656, 11696, -12801, 13974, -15216, 16530, -17917, 19380, -20920, 22540
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 02 2016

Keywords

Comments

More generally, the ordinary generating function for the alternating sum of k-gonal pyramidal numbers is x*(1 + (3 - k)*x)/((x - 1)*(x + 1)^4).

Crossrefs

Programs

  • Mathematica
    Table[((-1)^n (2 n (n + 2) (4 n + 1) - 3) + 3)/24, {n, 0, 40}]
    LinearRecurrence[{-3, -2, 2, 3, 1}, {0, -1, 6, -16, 34}, 40]
  • PARI
    concat(0, Vec(x*(1 - 3*x)/((x - 1)*(x + 1)^4) + O(x^50))) \\ Michel Marcus, Feb 02 2016

Formula

G.f.: x*(1 - 3*x)/((x - 1)*(x + 1)^4).
a(n) = ((-1)^n*(2*n*(n + 2)*(4*n + 1) - 3) + 3)/24.
a(n) = Sum_{k = 0..n} (-1)^k*A002412(k).

A333119 Triangle T read by rows: T(n, k) = (n - k)*(1 - (-1)^k + 2*k)/4, with 0 <= k < n.

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 0, 3, 2, 2, 0, 4, 3, 4, 2, 0, 5, 4, 6, 4, 3, 0, 6, 5, 8, 6, 6, 3, 0, 7, 6, 10, 8, 9, 6, 4, 0, 8, 7, 12, 10, 12, 9, 8, 4, 0, 9, 8, 14, 12, 15, 12, 12, 8, 5, 0, 10, 9, 16, 14, 18, 15, 16, 12, 10, 5, 0, 11, 10, 18, 16, 21, 18, 20, 16, 15, 10, 6
Offset: 1

Views

Author

Stefano Spezia, Mar 08 2020

Keywords

Comments

T(n, k) is the k-th super- and subdiagonal sum of the matrix M(n) whose permanent is A332566(n).
The h-th subdiagonal of the triangle T gives 0 followed by the multiples of h+1 repeated.
For k > 0, the (2*k-1)-th and (2*k)-th columns of the triangle T give the multiples of k.

Examples

			n\k| 0 1 2 3 4 5
---+------------
1  | 0
2  | 0 1
3  | 0 2 1
4  | 0 3 2 2
5  | 0 4 3 4 2
6  | 0 5 4 6 4 3
...
For n = 4 the matrix M(4) is
      0 1 1 2
      1 0 1 1
      1 1 0 1
      2 1 1 0
and therefore T(4, 0) = 0, T(4, 1) = 3, T(4, 2) = 2 and T(4, 3) = 2.
		

Crossrefs

Cf. A332566.
Cf. A000004: 1st column; A000027: 2nd and 3rd column; A004526: diagonal; A005843: 4th and 5th column; A052928: 1st subdiagonal; A168237: 2nd subdiagonal; A168273: 3rd subdiagonal; A173196: row sums.

Programs

  • Mathematica
    T[n_,k_]:=(n-k)(1-(-1)^k+2k)/4; Flatten[Table[T[n,k],{n,1,12},{k,0,n-1}]] (* or *)
    r[n_] := Table[SeriesCoefficient[y*(x*(2 + y + y^2) - (1 + y + 2*y^2))/((1 - x)^2 *(1 - y)^3 (1 + y)^2), {x, 0, i}, {y, 0, j}], {i, n, n}, {j, 0, n-1}]; Flatten[Array[r, 12]]

Formula

O.g.f.: y*(x*(2 + y + y^2) - (1 + y + 2*y^2))/((1 - x)^2*(1 - y)^3*(1 + y)^2).
T(n, k) = k*(n - k)/2 for k even.
T(n, k) = (1 + k)*(n - k)/2 for k odd.

A258440 Number of squares of all sizes in 3*n*(n+1)/2-ominoes in form of three-quarters of Aztec diamonds.

Original entry on oeis.org

3, 11, 25, 49, 84, 132, 196, 278, 379, 503, 651, 825, 1028, 1262, 1528, 1830, 2169, 2547, 2967, 3431, 3940, 4498, 5106, 5766, 6481, 7253, 8083, 8975, 9930, 10950, 12038, 13196, 14425, 15729, 17109, 18567, 20106, 21728, 23434, 25228, 27111, 29085, 31153, 33317, 35578, 37940, 40404, 42972, 45647, 48431
Offset: 1

Views

Author

Luce ETIENNE, May 30 2015

Keywords

Comments

These polyominoes are 6*n-gons, and thus their number of vertices is n*(3*n+7).
Schäfli's notation for figure corresponding to a(1): 4.4.4.

Examples

			a(1)=3, a(2)=9+2=11, a(3)=18+7=25, a(4)=30+15+4=49, a(5)=45+26+11+2=84.
		

Crossrefs

Programs

  • Magma
    [(52*n^3+186*n^2+212*n-3*(32*Floor(n/3)+3*(1-(-1)^n)))/144: n in [1..50]]; // Vincenzo Librandi, Jun 02 2015
  • Maple
    A258440:=n->(52*n^3+186*n^2+212*n-3*(32*floor(n/3)+3*(1-(-1)^n)))/144: seq(A258440(n), n=1..100); # Wesley Ivan Hurt, Jul 10 2015
  • Mathematica
    Table[(52 n^3 + 186 n^2 + 212 n - 3 (32 Floor[n/3] + 3 (1 - (-1)^n)))/144, {n, 45}] (* Vincenzo Librandi, Jun 02 2015 *)
  • PARI
    Vec(x*(2*x^3+3*x^2+5*x+3)/((x-1)^4*(x+1)*(x^2+x+1)) + O(x^100)) \\ Colin Barker, Jun 01 2015
    

Formula

a(n) = 2*A241526(n) - A173196(n+1).
a(n) = (1/8)*(Sum_{i=0..(n-1-floor(n/3)}(4*n+1-6*i-(-1)^i)*(4*n+3-6*i+(-1)^i)- Sum_{j=0..(2*n-1+(-1)^n)}(2*n+1+(-1)^n-4*j)*(2*n+1-(-1)^n-4*j)).
a(n) = (52*n^3+186*n^2+212*n-3*(32*floor(n/3)+3*(1-(-1)^n)))/144.
a(n) = 2*a(n-1)-a(n-3)-a(n-4)+2*a(n-6)-a(n-7) for n>7. - Colin Barker, Jun 01 2015
G.f.: x*(2*x^3+3*x^2+5*x+3) / ((x-1)^4*(x+1)*(x^2+x+1)). - Colin Barker, Jun 01 2015

Extensions

Typo in data fixed by Colin Barker, Jun 01 2015
Name edited by Michel Marcus, Dec 22 2020

A274248 Row sums of A273751.

Original entry on oeis.org

1, 5, 16, 37, 72, 124, 197, 294, 419, 575, 766, 995, 1266, 1582, 1947, 2364, 2837, 3369, 3964, 4625, 5356, 6160, 7041, 8002, 9047, 10179, 11402, 12719, 14134, 15650, 17271, 19000, 20841, 22797, 24872, 27069, 29392, 31844, 34429, 37150, 40011, 43015, 46166
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A002623, A173196 (same recurrence), A273751.

Programs

  • Magma
    [(n*(20-6*n+28*n^2) + 3*(1-(-1)^n))/48: n in [1..40]]; // G. C. Greubel, Oct 19 2023
    
  • Mathematica
    (* First program *)
    T[n_, k_]:= T[n, k]= Which[k==n, n(n-1) + 1, k==n-1, (n-1)^2 + 1, k==1, n + T[n-2, 1], 1 < k < n-1, T[n-1, k+1] + 1, True, 0];
    a[n_]:= Sum[T[n, k], {k, 1, n}];
    Array[a, 40]
    (* second program: *)
    LinearRecurrence[{3, -2, -2, 3, -1}, {1, 5, 16, 37, 72}, 50] (* Vincenzo Librandi, Jun 16 2016 *)
  • SageMath
    [(n*(20-6*n+28*n^2) + 6*(n%2))/48 for n in range(1,41)] # G. C. Greubel, Oct 19 2023

Formula

a(n) = (14*n^3 - 3*n^2 + 10*n + 3*mod(n, 2))/24.
G.f.: x*(1 + 2*x + 3*x^2 + x^3)/((1 - x)^4*(1 + x)). - Ilya Gutkovskiy, Jun 17 2016
E.g.f.: (1/48)*( -3*exp(-x) + (3 + 42*x + 78*x^2 + 28*x^3)*exp(x) ). - G. C. Greubel, Oct 19 2023

A204185 Number of quadrilaterals in a triangular matchstick arrangement of side n.

Original entry on oeis.org

0, 0, 6, 33, 102, 243, 492, 894, 1500, 2370, 3570, 5175, 7266, 9933, 13272, 17388, 22392, 28404, 35550, 43965, 53790, 65175, 78276, 93258, 110292, 129558, 151242, 175539, 202650, 232785, 266160, 303000, 343536, 388008, 436662, 489753, 547542, 610299, 678300, 751830, 831180, 916650, 1008546, 1107183, 1212882, 1325973, 1446792, 1575684, 1713000, 1859100, 2014350
Offset: 0

Views

Author

Elliott Line & Paul Bostock (enigma.mensa(AT)yahoo.co.uk), Jan 12 2012

Keywords

Comments

The total number of parallelograms and trapezoids that appear in a triangular matchstick array of side n.
Can always be split into three equal sets, parallelograms 'belonging' to the side of the triangle that none of its sides are parallel to, and trapezoids 'belonging' to the side of the triangle that two of its sides are parallel to.
Rhombuses belonging to each side are A173196(n).
Irregular parallelograms belonging to each side are 2*A001752(n-3).
'Upside down' trapezoids (those where the shorter of the two parallel sides is closest to the parallel side of the triangle) belonging to each side are A001752(n-3).
'Right side up' trapezoids belonging to each side are A000332(n+2).

Examples

			a(3) = 33 because the following figure contains 33 quadrilaterals (15 parallelograms and 18 trapezoids)
....... /\
...... /\/\
..... /\/\/\
Size and quantity of each quadrilateral in above figure:
2 triangles: 9
3 triangles: 12
4 triangles: 6
5 triangles: 3
8 triangles: 3
		

Crossrefs

Cf. A173196 = number of rhombuses of a particular orientation; A001752, related to number of irregular parallelograms and number of 'upside down' trapezoids; A000332, related to number of 'right side up' trapezoids (see comments above); A002717 = number of triangles in a triangular matchstick arrangement; A000217 = triangular numbers.

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,a+Floor[n(n+2) (10(n+1)-3)/8]}; Transpose[ NestList[ nxt,{0,0},50]][[2]] (* Harvey P. Dale, Jan 11 2013 *)
  • PARI
    concat([0,0], Vec(-3*x^2*(3*x+2)/((x-1)^5*(x+1)) + O(x^100))) \\ Colin Barker, Mar 16 2015

Formula

a(n) = Sum_{k=1..n-1} b(k)*T(n-k), where b(m) = 3*floor(5*m/2) and T(m) is the m-th triangular number A000217.
a(n) = a(n-1) + floor((n+1)*(n-1)*(10*n-3)/8).
a(n) = 3*(A173196(n) + A000332(n+2) + 3*A001752(n-3)) (see comments above).
From Colin Barker, Mar 16 2015: (Start)
a(n) = (3-3*(-1)^n-16*n-16*n^2+16*n^3+10*n^4)/32.
a(n) = 4*a(n-1)-5*a(n-2)+5*a(n-4)-4*a(n-5)+a(n-6).
G.f.: -3*x^2*(3*x+2) / ((x-1)^5*(x+1)). (End)
E.g.f.: (x*(5*x^3 + 38*x^2 + 51*x - 3)*cosh(x) + (5*x^4 + 38*x^3 + 51*x^2 - 3*x + 3)*sinh(x))/16. - Stefano Spezia, Jul 19 2022

A260918 Number of squares of all sizes in polyominoes obtained by union of two pyramidal figures (A092498) with intersection equals A002623.

Original entry on oeis.org

0, 1, 5, 15, 33, 60, 100, 154, 224, 313, 423, 555, 713, 898, 1112, 1358, 1638, 1953, 2307, 2701, 3137, 3618, 4146, 4722, 5350, 6031, 6767, 7561, 8415, 9330, 10310, 11356, 12470, 13655, 14913, 16245, 17655, 19144, 20714, 22368, 24108, 25935, 27853, 29863
Offset: 0

Views

Author

Luce ETIENNE, Aug 04 2015

Keywords

Comments

The resulting polyforms are n*(3*n-1)/2-polyominoes.
Also they are 6*n-gons with n>1.
Schäfli's notation for figure corresponding to a(1): 4.

Examples

			a(1)=1, a(2)=5, a(3)=12+3=15, a(4)=22+9+2=33, a(5)=35+18+7=60, a(6)=51+30+15+4=100.
		

Crossrefs

Programs

  • Magma
    [(52*n^3+90*n^2+20*n-3*(32*Floor((n+1)/3)+3*(1-(-1)^n)))/144: n in [0..50]]; // Vincenzo Librandi, Aug 12 2015
  • Mathematica
    Table[(52 n^3 + 90 n^2 + 20 n - 3 (32 Floor[(n + 1) / 3] + 3 (1 - (-1)^n))) / 144, {n, 0, 45}] (* Vincenzo Librandi, Aug 12 2015 *)
  • PARI
    concat(0, Vec(x*(4*x^3+5*x^2+3*x+1)/((x-1)^4*(x+1)*(x^2+x+1)) + O(x^100))) \\ Colin Barker, Aug 08 2015
    

Formula

a(n) = A258440(n) - A000212(n+1).
a(n) = (1/8)*((Sum_{i=0..floor(2*n/3)} (4*n+1-6*i-(-1)^i)*(4*n-1-6*i+(-1)^i)) - (Sum_{j=0..(2*n-1+(-1)^n)/4} (2*n+1-(-1)^n-4*j)*(2*n+1+(-1)^n-4*j))).
a(n) = (52*n^3+90*n^2+20*n-3*(32*floor((n+1)/3)+3*(1-(-1)^n)))/144.
G.f.: x*(4*x^3+5*x^2+3*x+1) / ((x-1)^4*(x+1)*(x^2+x+1)). - Colin Barker, Aug 08 2015
E.g.f.: (3*exp(x)*x*(65 + x*(123 + 26*x)) + 32*sqrt(3)*exp(-x/2)*sin(sqrt(3)*x/2) - 27*sinh(x))/216. - Stefano Spezia, Nov 15 2024

Extensions

Two repeated terms deleted by Colin Barker, Aug 08 2015

A269428 Alternating sum of heptagonal pyramidal numbers.

Original entry on oeis.org

0, -1, 7, -19, 41, -74, 122, -186, 270, -375, 505, -661, 847, -1064, 1316, -1604, 1932, -2301, 2715, -3175, 3685, -4246, 4862, -5534, 6266, -7059, 7917, -8841, 9835, -10900, 12040, -13256, 14552, -15929, 17391, -18939, 20577, -22306, 24130, -26050, 28070
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 26 2016

Keywords

Crossrefs

Programs

  • Magma
    [((20*n^3+42*n^2+4*n-9)*(-1)^n+9)/48: n in [0..50]]; // Vincenzo Librandi, Feb 26 2016
    
  • Mathematica
    Table[((20 n^3 + 42 n^2 + 4 n - 9) (-1)^n + 9)/48, {n, 0, 40}]
    LinearRecurrence[{-3, -2, 2, 3, 1}, {0, -1, 7, -19, 41}, 41]
  • PARI
    a(n)=((20*n^3 + 42*n^2 + 4*n - 9)*(-1)^n + 9)/48 \\ Charles R Greathouse IV, Jul 26 2016

Formula

G.f.: x*(1 - 4*x)/((x - 1)*(x + 1)^4).
a(n) = ((20*n^3 + 42*n^2 + 4*n - 9)*(-1)^n + 9)/48.
a(n) = Sum_{k = 0..n} (-1)^k*A002413(k).
Sum_{n>=1} 1/a(n) = -0.8939139178060972723185724267951741... . - Vaclav Kotesovec, Feb 26 2016
E.g.f.: (9*sinh(x) - (33*x - 51*x^2 + 10*x^3)*exp(-x))/24. - Franck Maminirina Ramaharo, Nov 11 2018
Showing 1-10 of 15 results. Next