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-6 of 6 results.

A193842 Triangular array: the fission of the polynomial sequence ((x+1)^n: n >= 0) by the polynomial sequence ((x+2)^n: n >= 0). (Fission is defined at Comments.)

Original entry on oeis.org

1, 1, 4, 1, 7, 13, 1, 10, 34, 40, 1, 13, 64, 142, 121, 1, 16, 103, 334, 547, 364, 1, 19, 151, 643, 1549, 2005, 1093, 1, 22, 208, 1096, 3478, 6652, 7108, 3280, 1, 25, 274, 1720, 6766, 17086, 27064, 24604, 9841, 1, 28, 349, 2542, 11926, 37384, 78322, 105796
Offset: 0

Views

Author

Clark Kimberling, Aug 07 2011

Keywords

Comments

Suppose that p = p(n)*x^n + p(n-1)*x^(n-1) + ... + p(1)*x + p(0) is a polynomial and that Q is a sequence of polynomials:
...
q(k,x) = t(k,0)*x^k + t(k,1)*x^(k-1) + ... + t(k,k-1)*x + t(k,k),
...
for k = 0, 1, 2, ... The Q-downstep of p is the polynomial given by
...
D(p) = p(n)*q(n-1,x) + p(n-1)*q(n-2,x) + ... + p(1)*q(0,x). (Note that p(0) does not appear. "Q-downstep" as just defined differs slightly from "Q-downstep" as defined for a different purpose at A193649.)
...
Now suppose that P = (p(n,x): n >= 0) and Q = (q(n,x): n >= 0) are sequences of polynomials, where n indicates degree. The fission of P by Q, denoted by P^^Q, is introduced here as the sequence W = (w(n,x): n >= 0) of polynomials defined by w(0,x) = 1 and w(n,x) = D(p(n+1,x)).
...
Strictly speaking, ^^ is an operation on sequences of polynomials. However, if P and Q are regarded as numerical triangles (of coefficients of polynomials), then ^^ can be regarded as an operation on numerical triangles. In this case, row n of P^^Q, for n > 0, is given by the matrix product P(n+1)*QQ(n), where P(n+1) =(p(n+1,n+1), p(n+1,n), ..., p(n+1,2), p(n+1,1)) and QQ(n) is the (n+1)-by-(n+1) matrix given by
...
q(n,0) .. q(n,1)............. q(n,n-1) .... q(n,n)
0 ....... q(n-1,0)........... q(n-1,n-2)... q(n-1,n-1)
0 ....... 0.................. q(n-2,n-3) .. q(n-2,n-2)
...
0 ....... 0.................. q(1,0) ...... q(1,1)
0 ....... 0 ................. 0 ........... q(0,0).
Here, the polynomial q(k,x) is taken to be
q(k,0)*x^k + q(k,1)x^(k-1) + ... + q(k,k)*x + q(k,k);
i.e., "q" is used instead of "t".
...
Example: Let p(n,x) = (x+1)^n and q(n,x) = (x+2)^n. Then
...
w(0,x) = 1 by the definition of W,
w(1,x) = D(p(2,x)) = 1*(x+2) + 2*1 = x + 4,
w(2,x) = D(p(3,x)) = 1*(x^2+4*x+4) + 3*(x+2) + 3*1 = x^2 + 7*x + 13,
w(3,x) = D(p(4,x)) = 1*(x^3+6*x^2+12*x+8) + 4*(x^2+4x+4) + 6*(x+2) + 4*1 = x^3 + 10*x^2 + 34*x + 40.
...
From these first 4 polynomials in the sequence P^^Q, we can write the first 4 rows of P^^Q when P, Q, and P^^Q are regarded as triangles:
1
1...4
1...7....13
1...10...34...40
...
In the following examples, r(P^^Q) is the mirror of P^^Q, obtained by reversing the rows of P^^Q. Let u denote the polynomial x^n + x^(n-1) + ... + x + 1.
...
..P........Q...........P^^Q........r(P^^Q)
(x+1)^n....(x+2)^n.....A193842.....A193843
(x+1)^n....(x+1)^n.....A193844.....A193845
(x+2)^n....(x+1)^n.....A193846.....A193847
(2x+1)^n...(x+1)^n.....A193856.....A193857
(x+1)^n....(2x+1)^n....A193858.....A193859
(x+1)^n.......u........A054143.....A104709
..u........(x+1)^n.....A074909.....A074909
..u...........u........A002260.....A004736
(x+2)^n.......u........A193850.....A193851
..u.........(x+2)^n....A193844.....A193845
(2x+1)^n......u........A193860.....A193861
..u.........(2x+1)^n...A115068.....A193862
...
Regarding A193842,
col 1 ...... A000012
col 2 ...... A016777
col 3 ...... A081271
w(n,n) ..... A003462
w(n,n-1) ... A014915

Examples

			First six rows, for 0 <= k <= n and 0 <= n <= 5:
  1
  1...4
  1...7....13
  1...10...34....40
  1...13...64....142...121
  1...16...103...334...547...364
		

Crossrefs

Cf. A193722 (fusion of P by Q), A193649 (Q-residue), A193843 (mirror of A193842).

Programs

  • Magma
    [ (&+[3^(k-j)*Binomial(n-j,k-j): j in [0..k]]): k in [0..n], n in [0..10]]; // G. C. Greubel, Feb 18 2020
  • Maple
    fission := proc(p, q, n) local d, k;
    p(n+1,0)*q(n,x)+add(coeff(p(n+1,x),x^k)*q(n-k,x), k=1..n);
    seq(coeff(%,x,n-k), k=0..n) end:
    A193842_row := n -> fission((n,x) -> (x+1)^n, (n,x) -> (x+2)^n, n);
    for n from 0 to 5 do A193842_row(n) od; # Peter Luschny, Jul 23 2014
    # Alternatively:
    p := (n,x) -> add(x^k*(1+3*x)^(n-k),k=0..n): for n from 0 to 7 do [n], PolynomialTools:-CoefficientList(p(n,x), x) od; # Peter Luschny, Jun 18 2017
  • Mathematica
    (* First program *)
    z = 10;
    p[n_, x_] := (x + 1)^n;
    q[n_, x_] := (x + 2)^n
    p1[n_, k_] := Coefficient[p[n, x], x^k];
    p1[n_, 0] := p[n, x] /. x -> 0;
    d[n_, x_] := Sum[p1[n, k]*q[n - 1 - k, x], {k, 0, n - 1}]
    h[n_] := CoefficientList[d[n, x], {x}]
    TableForm[Table[Reverse[h[n]], {n, 0, z}]]
    Flatten[Table[Reverse[h[n]], {n, -1, z}]]  (* A193842 *)
    TableForm[Table[h[n], {n, 0, z}]]  (* A193843 *)
    Flatten[Table[h[n], {n, -1, z}]]
    (* Second program *)
    Table[SeriesCoefficient[((x+3)^(n+1) -1)/(x+2), {x,0,n-k}], {n,0,10}, {k,0,n}]//Flatten (* G. C. Greubel, Feb 18 2020 *)
  • PARI
    T(n,k) = sum(j=0,k, 3^(k-j)*binomial(n-j,k-j)); \\ G. C. Greubel, Feb 18 2020
    
  • Sage
    from mpmath import mp, hyp2f1
    mp.dps = 100; mp.pretty = True
    def T(n,k):
        return 3^k*binomial(n,k)*hyp2f1(1,-k,-n,1/3)-0^(n-k)//2
    for n in range(7):
        print([int(T(n,k)) for k in (0..n)]) # Peter Luschny, Jul 23 2014
    
  • Sage
    # Second program using the 'fission' operation.
    def fission(p, q, n):
        F = p(n+1,0)*q(n,x)+add(expand(p(n+1,x)).coefficient(x,k)*q(n-k,x) for k in (1..n))
        return [expand(F).coefficient(x,n-k) for k in (0..n)]
    A193842_row = lambda k: fission(lambda n,x: (x+1)^n, lambda n,x: (x+2)^n, k)
    for n in range(7): A193842_row(n) # Peter Luschny, Jul 23 2014
    

Formula

From Peter Bala, Jul 16 2013: (Start)
T(n,k) = Sum_{i = 0..k} 3^(k-i)*binomial(n-i,k-i).
O.g.f.: 1/((1 - x*t)*(1 - (1 + 3*x)*t)) = 1 + (1 + 4*x)*t + (1 + 7*x + 13*x^2)*t^2 + ....
The n-th row polynomial is R(n,x) = (1/(2*x + 1))*((3*x + 1)^(n+1) - x^(n+1)). (End)
T(n,k) = T(n-1,k) + 4*T(n-1,k-1) - T(n-2,k-1) - 3*T(n-2,k-2), T(0,0) = 1, T(1,0) = 1, T(1,1) = 4, T(n,k) = 0 if k < 0 or if k > n. - Philippe Deléham, Jan 17 2014
T(n,k) = 3^k * C(n,k) * hyp2F1(1, -k, -n, 1/3) with or without the additional term -0^(n-k)/2 depending on the exact definition of the hypergeometric function used. Compare formulas 15.2.5 and 15.2.6 in the DLMF reference. - Peter Luschny, Jul 23 2014

Extensions

Name and Comments edited by Petros Hadjicostas, Jun 05 2020

A283394 a(n) = 3*n*(3*n + 7)/2 + 4.

Original entry on oeis.org

4, 19, 43, 76, 118, 169, 229, 298, 376, 463, 559, 664, 778, 901, 1033, 1174, 1324, 1483, 1651, 1828, 2014, 2209, 2413, 2626, 2848, 3079, 3319, 3568, 3826, 4093, 4369, 4654, 4948, 5251, 5563, 5884, 6214, 6553, 6901, 7258, 7624, 7999, 8383, 8776, 9178, 9589, 10009
Offset: 0

Views

Author

Bruno Berselli, Mar 23 2017

Keywords

Comments

Sum_{k = 0..n} (3*k + r)^3 is divisible by 3*n*(3*n + 2*r + 3)/2 + r^2: the sequence corresponds to the case r = 2 of this formula (other cases are listed in Crossrefs section).
Also, Sum_{k = 0..n} (3*k + 2)^3 / a(n) gives 2, 7, 15, 26, 40, 57, 77, 100, 126, 155, 187, 222, ... (A005449).
a(n) is even if n belongs to A014601. No term is divisible by 3, 5, 7 and 11.

Crossrefs

Sequences with formula 3*n*(3*n + 2*r + 3)/2 + r^2: A038764 (r=-1), A027468 (r=0), A081271 (r=1), this sequence (r=2), A027468 (r=3; offset: -1), A080855 (r=4; offset: -2).

Programs

  • Magma
    [3*n*(3*n+7)/2+4: n in [0..50]];
    
  • Mathematica
    Table[3 n (3 n + 7)/2 + 4, {n, 0, 50}]
    LinearRecurrence[{3,-3,1},{4,19,43},50] (* Harvey P. Dale, Mar 02 2019 *)
  • Maxima
    makelist(3*n*(3*n+7)/2+4, n, 0, 50);
    
  • PARI
    a(n) = 3*n*(3*n + 7)/2 + 4; \\ Indranil Ghosh, Mar 24 2017
  • Python
    [3*n*(3*n+7)/2+4 for n in range(50)]
    
  • Sage
    [3*n*(3*n+7)/2+4 for n in range(50)]
    

Formula

O.g.f.: (4 + 7*x - 2*x^2)/(1 - x)^3.
E.g.f.: (8 + 30*x + 9*x^2)*exp(x)/2.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = A081271(-n-2).
a(n) = 3*A095794(n+1) + 1.
a(n) = A034856(3*n+2) = A101881(6*n+2) = A165157(6*n+3) = A186349(6*n+3).
The inverse binomial transform yields 4, 15, 9, 0 (0 continued), therefore:
a(n) = 4*binomial(n,0) + 15*binomial(n,1) + 9*binomial(n,2).

A081272 Downward vertical of triangular spiral in A051682.

Original entry on oeis.org

1, 25, 85, 181, 313, 481, 685, 925, 1201, 1513, 1861, 2245, 2665, 3121, 3613, 4141, 4705, 5305, 5941, 6613, 7321, 8065, 8845, 9661, 10513, 11401, 12325, 13285, 14281, 15313, 16381, 17485, 18625, 19801, 21013, 22261, 23545, 24865, 26221, 27613, 29041, 30505
Offset: 0

Views

Author

Paul Barry, Mar 15 2003

Keywords

Comments

Reflection of A081271 in the horizontal A051682.
Binomial transform of (1, 24, 36, 0, 0, 0, .....).
One of the six verticals of a triangular spiral which starts with 1 (see the link). Other verticals are A060544, A081589, A080855, A157889, A038764. - Yuriy Sibirmovsky, Sep 18 2016.

Crossrefs

Programs

  • Mathematica
    Table[n^2 + (n + 1)^2, {n, 0, 300, 3}] (* or *) LinearRecurrence[{3, -3, 1}, {1, 25, 85}, 80] (* Vladimir Joseph Stephan Orlovsky, Feb 17 2012 *)
    Table[n^2 + (n + 1)^2, {n, 0, 150, 3}] (* Vincenzo Librandi, Aug 07 2013 *)
  • PARI
    x='x+O('x^99); Vec((1+22*x+13*x^2)/(1-x)^3) \\ Altug Alkan, Sep 18 2016

Formula

a(n) = C(n, 0) + 24*C(n, 1) + 36*C(n, 2).
a(n) = 18*n^2 + 6*n + 1.
G.f.: (1 + 22*x + 13*x^2)/(1 - x)^3.
E.g.f.: exp(x)*(1 + 24*x + 18*x^2). - Stefano Spezia, Mar 07 2023

A119673 T(n, k) = 3*T(n-1, k-1) + T(n-1, k) for k < n and T(n, n) = 1, T(n, k) = 0, if k < 0 or k > n; triangle read by rows.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 7, 13, 1, 1, 10, 34, 40, 1, 1, 13, 64, 142, 121, 1, 1, 16, 103, 334, 547, 364, 1, 1, 19, 151, 643, 1549, 2005, 1093, 1, 1, 22, 208, 1096, 3478, 6652, 7108, 3280, 1, 1, 25, 274, 1720, 6766, 17086, 27064, 24604, 9841, 1, 1, 28, 349, 2542, 11926, 37384, 78322, 105796, 83653, 29524, 1
Offset: 0

Views

Author

Zerinvary Lajos, Jun 11 2006

Keywords

Examples

			Triangle begins:
  1;
  1,  1;
  1,  4,   1;
  1,  7,  13,    1;
  1, 10,  34,   40,    1;
  1, 13,  64,  142,  121,     1;
  1, 16, 103,  334,  547,   364,     1;
  1, 19, 151,  643, 1549,  2005,  1093,     1;
  1, 22, 208, 1096, 3478,  6652,  7108,  3280,    1;
  1, 25, 274, 1720, 6766, 17086, 27064, 24604, 9841, 1;
		

Crossrefs

Programs

  • Magma
    function T(n,k)
      if k lt 0 or k gt n then return 0;
      elif k eq n then return 1;
      else return 3*T(n-1,k-1) + T(n-1,k);
      end if;
      return T;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 18 2019
    
  • Maple
    T := (n,k,m) -> (1-m)^(-n+k)-m^(k+1)*pochhammer(n-k,k+1)* hypergeom([1,n+1],[k+2],m)/(k+1)!; A119673 := (n,k) -> T(n,k,3);
    seq(print(seq(round(evalf(A119673(n,k))),k=0..n)),n=0..10); # Peter Luschny, Jul 25 2014
  • Mathematica
    T[, 0]=1; T[n, n_]=1; T[n_, k_]/; 0, ] = 0;
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] (* Jean-François Alcover, Jun 13 2019 *)
  • PARI
    T(n,k) = if(k<0 || k>n, 0, if(k==n, 1, 3*T(n-1, k-1) +T(n-1,k)));
    for(n=0,12, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Nov 18 2019
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k<0 or k>n): return 0
        elif (k==n): return 1
        else: return 3*T(n-1, k-1) + T(n-1, k)
    [[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 18 2019

Formula

T(n,k) = R(n,k,3) where R(n,k,m) = (1-m)^(-n+k)-m^(k+1)*Pochhammer(n-k, k+1)* hyper2F1([1,n+1],[k+2],m)/(k+1)!. - Peter Luschny, Jul 25 2014

Extensions

Definition clarified by Philippe Deléham, Jun 13 2006
Entry revised by N. J. A. Sloane, Jun 19 2006

A096966 Triangle (read by rows) in which the number of entries in a row only increases by 1 every other row, the first column and the 'diagonal' is set to all 1's and a(i,j) = a(i-1,j) + a(i-1,j-1) + a(i-2,j-1) + a(i-3,j-1) for other entries.

Original entry on oeis.org

1, 1, 1, 1, 1, 4, 1, 7, 1, 1, 10, 13, 1, 13, 34, 1, 1, 16, 64, 49, 1, 19, 103, 160, 1, 1, 22, 151, 361, 211, 1, 25, 208, 679, 781, 1, 1, 28, 274, 1141, 1981, 994, 1, 31, 349, 1774, 4162, 3967, 1, 1, 34, 433, 2605, 7756, 10891, 4963, 1, 37, 526, 3661, 13276, 24790, 20815, 1
Offset: 0

Views

Author

Gerald McGarvey, Aug 18 2004

Keywords

Comments

The 2nd column is A016777 (3n+1), the 3rd column is A081271 (Vertical of triangular spiral in A051682.)

A338369 Triangle read by rows: T(n,k) = (Sum_{i=0..n-k}(1+k*i)^3)/(Sum_{i=0..n-k} (1+k*i)) for 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 6, 7, 1, 1, 10, 17, 13, 1, 1, 15, 31, 34, 21, 1, 1, 21, 49, 64, 57, 31, 1, 1, 28, 71, 103, 109, 86, 43, 1, 1, 36, 97, 151, 177, 166, 121, 57, 1, 1, 45, 127, 208, 261, 271, 235, 162, 73, 1, 1, 55, 161, 274, 361, 401, 385, 316, 209, 91, 1, 1, 66, 199, 349, 477, 556, 571, 519, 409, 262, 111, 1
Offset: 0

Views

Author

Werner Schulte, Nov 26 2020

Keywords

Comments

Seen as a square array: (1) A(n,k) = T(n+k,k) = (k^2*n^2+k*(k+2)*n+2)/2 for n,k >= 0; (2) A(n,k) = A(n-1,k) + k*(1 + k*n) for k >= 0 and n > 0; (3) A(n,k) = A(n,k-1) + k*n*(n+1) - n*(n-1)/2 for n >= 0 and k > 0; (4) G.f. of row n >= 0: (2 + (n^2+3*n-4)*x + (n^2-n+2)*x^2) / (2*(1-x)^3).

Examples

			The triangle T(n,k) for 0 <= k <= n starts:
n \k :  0   1    2    3    4    5    6    7    8    9   10   11   12
====================================================================
   0 :  1
   1 :  1   1
   2 :  1   3    1
   3 :  1   6    7    1
   4 :  1  10   17   13    1
   5 :  1  15   31   34   21    1
   6 :  1  21   49   64   57   31    1
   7 :  1  28   71  103  109   86   43    1
   8 :  1  36   97  151  177  166  121   57    1
   9 :  1  45  127  208  261  271  235  162   73    1
  10 :  1  55  161  274  361  401  385  316  209   91    1
  11 :  1  66  199  349  477  556  571  519  409  262  111    1
  12 :  1  78  241  433  609  736  793  771  673  514  321  133    1
etc.
		

Crossrefs

Cf. A000012 (column 0, main diagonal), A000217 (column 1), A056220 (column 2), A081271 (column 3), A118057 (column 4), A002061 (1st subdiagonal), A056109 (2nd subdiagonal), A085473 (3rd subdiagonal), A272039 (4th subdiagonal).

Programs

  • Mathematica
    T[n_, k_] := Sum[(1 + k*i)^3, {i, 0, n - k}]/Sum[1 + k*i, {i, 0, n - k}]; Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Amiram Eldar, Nov 26 2020 *)
  • PARI
    for(n=0,12,for(k=0,n,print1((k^2*(n-k)^2+k*(k+2)*(n-k)+2)/2,", "));print(" "))

Formula

T(n,k) = (k^2*(n-k)^2 + k*(k+2)*(n-k) + 2)/2 for 0 <= k <= n.
T(n,0) = T(n,n) = 1 for n >= 0.
T(n,k) = T(n-1,k-1) + k*(n-k)*(n-k+1) - (n-k)*(n-k-1)/2 for 0 < k <= n.
T(n,k) = T(n-1,k) + k * (1+k*(n-k)) for 0 <= k < n.
G.f. of column k >= 0: (1 + (k^2+k-2)*t + (1-k)*t^2) * t^k / (1-t)^3.
E.g.f.: exp(x+y)*(2 + (x^2 + 2*x - 2)*y + (x^2 - 4*x + 2)*y^2 - (2*x - 5)*y^3 + y^4)/2. - Stefano Spezia, Nov 27 2020
Showing 1-6 of 6 results.