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

A157783 Triangle read by rows: the coefficient [x^k] of the polynomial Product_{i=1..n} (3^(i-1)-x) in row n, column k, 0 <= k <= n.

Original entry on oeis.org

1, 1, -1, 3, -4, 1, 27, -39, 13, -1, 729, -1080, 390, -40, 1, 59049, -88209, 32670, -3630, 121, -1, 14348907, -21493836, 8027019, -914760, 33033, -364, 1, 10460353203, -15683355351, 5873190687, -674887059, 24995817, -298389, 1093
Offset: 0

Views

Author

Roger L. Bagula, Mar 06 2009

Keywords

Comments

Row sums except n=0 are zero.
Triangle T(n,k), 0 <= k <= n, read by rows given by [1,q-1,q^2,q^3-q,q^4,q^5-q^2,q^6,q^7-q^3,q^8,...] DELTA [ -1,0,-q,0,-q^2,0,-q^3,0,-q^4,0,...] (for q=3)=[1,2,9,24,81,234,729,2160,6561,...] DELTA [ -1,0,-3,0,-9,0,-27,0,-81,0,-243,0,...] where DELTA is the operator defined in A084938; see A122006 and A000244. - Philippe Deléham, Mar 09 2009

Examples

			Triangle begins
  1;
  1, -1;
  3, -4, 1;
  27, -39, 13, -1;
  729, -1080, 390, -40, 1;
  59049, -88209, 32670, -3630, 121, -1;
  14348907, -21493836, 8027019, -914760, 33033, -364, 1;
  10460353203, -15683355351, 5873190687, -674887059, 24995817, -298389, 1093, -1;
  22876792454961, -34309958505840, 12860351387820, -1481851188720, 55340738838, -677572560, 2688780, -3280, 1;
Row n=3 is 27 - 39*x + 13*x^2 - x^3.
		

Crossrefs

Cf. A157832, A135950, A022166, A047656 (column k=1), A003462 (subdiagonal k=n-1), A203243 (subdiagonal k=n-2).

Programs

  • Maple
    A157783 := proc(n,k)
        product( 3^(i-1)-x,i=1..n) ;
        coeftayl(%,x=0,k) ;
    end proc: # R. J. Mathar, Oct 15 2013
  • Mathematica
    Clear[f, q, M, n, m];
    q = 3;
    f[k_, m_] := If[k == m, q^(n - k), If[m == 1 && k < n, q^(n - k), If[k == n && m == 1, -(n-1), If[k == n && m > 1, 1, 0]]]];
    M[n_] := Table[f[k, m], {k, 1, n}, {m, 1, n}];
    Table[M[n], {n, 1, 10}];
    Join[{1}, Table[Expand[CharacteristicPolynomial[M[n], x]], {n, 1, 7}]];
    a = Join[{{ 1}}, Table[CoefficientList[CharacteristicPolynomial[M[n], x], x], {n, 1, 7}]];
    Flatten[a]

A167993 Expansion of x^2/((3*x-1)*(3*x^2-1)).

Original entry on oeis.org

0, 0, 1, 3, 12, 36, 117, 351, 1080, 3240, 9801, 29403, 88452, 265356, 796797, 2390391, 7173360, 21520080, 64566801, 193700403, 581120892, 1743362676, 5230147077, 15690441231, 47071500840, 141214502520, 423644039001, 1270932117003, 3812797945332, 11438393835996
Offset: 0

Views

Author

Paul Curtz, Nov 16 2009

Keywords

Comments

The terms satisfy a(n) = 3*a(n-1) +3*a(n-2) -9*a(n-3), so they follow the pattern a(n) = p*a(n-1) +q*a(n-2) -p*q*a(n-3) with p=q=3. This could be called the principal sequence for that recurrence because we have set all but one of the initial terms to zero. [p=q=1 leads to the principal sequence A004526. p=q=2 leads essentially to A032085. The common feature is that the denominator of the generating function does not have a root at x=1, so the sequences of higher order successive differences have the same recurrence as the original sequence. See A135094, A010036, A006516.]

Crossrefs

Cf. A138587, A107767 (partial sums).

Programs

  • Mathematica
    CoefficientList[Series[x^2/((3*x - 1)*(3*x^2 - 1)), {x, 0, 50}], x] (* G. C. Greubel, Jul 03 2016 *)
    LinearRecurrence[{3,3,-9},{0,0,1},30] (* Harvey P. Dale, Nov 05 2017 *)
  • PARI
    Vec(x^2/((3*x-1)*(3*x^2-1))+O(x^99)) \\ Charles R Greathouse IV, Jun 29 2011

Formula

a(2*n+1) = 3*a(2*n).
a(2*n) = A122006(2*n)/2.
a(n) = 3*a(n-1) + 3*a(n-4) - 9*a(n-3).
a(n+1) - a(n) = A122006(n).
a(n) = (3^n - A108411(n+1))/6.
G.f.: x^2/((3*x-1)*(3*x^2-1)).
From Colin Barker, Sep 23 2016: (Start)
a(n) = 3^(n-1)/2-3^(n/2-1)/2 for n even.
a(n) = 3^(n-1)/2-3^(n/2-1/2)/2 for n odd.
(End)

Extensions

Formulae corrected by Johannes W. Meijer, Jun 28 2011
Showing 1-2 of 2 results.