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

A061989 Number of ways to place 3 nonattacking queens on a 3 X n board.

Original entry on oeis.org

0, 0, 0, 0, 4, 14, 36, 76, 140, 234, 364, 536, 756, 1030, 1364, 1764, 2236, 2786, 3420, 4144, 4964, 5886, 6916, 8060, 9324, 10714, 12236, 13896, 15700, 17654, 19764, 22036, 24476, 27090, 29884, 32864, 36036, 39406, 42980, 46764, 50764
Offset: 0

Views

Author

Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), May 29 2001

Keywords

Crossrefs

Essentially the same as A079908.

Programs

  • Magma
    [0,0,0] cat [(n-3)*(n^2-6*n+12): n in [3..50]]; // G. C. Greubel, Apr 29 2022
    
  • Maple
    A061989 := proc(n)
        if n >= 3 then
            (n-3)*(n^2-6*n+12) ;
        else
            0;
        end if;
    end proc:
    seq(A061989(n),n=0..30) ; # R. J. Mathar, Aug 16 2019
  • Mathematica
    CoefficientList[Series[2*x^4*(2-x+2*x^2)/(1-x)^4, {x, 0, 50}], x] (* Vincenzo Librandi, May 02 2013 *)
  • SageMath
    [0,0,0]+[(n-3)*((n-3)^2 +3) for n in (3..50)] # G. C. Greubel, Apr 29 2022

Formula

G.f.: 2*x^4*(2-x+2*x^2)/(1-x)^4.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4), n >= 7.
Explicit formula (H. Tarry, 1890): a(n) = (n-3)*(n^2-6*n+12), n >= 3.
(4, 14, 36, ...) is the binomial transform of row 4 of A117937: (4, 10, 12, 6). - Gary W. Adamson, Apr 09 2006
a(n) = 2*A229183(n-3). - R. J. Mathar, Aug 16 2019
E.g.f.: 36 + 14*x + 2*x^2 + (-36 + 22*x - 6*x^2 + x^3)*exp(x). - G. C. Greubel, Apr 29 2022

A117938 Triangle, columns generated from Lucas Polynomials.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 1, 3, 6, 4, 1, 4, 11, 14, 7, 1, 5, 18, 36, 34, 11, 1, 6, 27, 76, 119, 82, 18, 1, 7, 38, 140, 322, 393, 198, 29, 1, 8, 51, 234, 727, 1364, 1298, 478, 47, 1, 9, 66, 364, 1442, 3775, 5778, 4287, 1154, 76, 1, 10, 83, 536, 2599, 8886, 19602, 24476, 14159, 2786, 123
Offset: 1

Views

Author

Gary W. Adamson, Apr 03 2006

Keywords

Comments

Companion triangle using Fibonacci polynomial generators = A073133. Inverse binomial transforms of the columns defines rows of A117937 (with some adjustments of offset).
A309220 is another version of the same triangle (except it omits the last diagonal), and perhaps has a clearer definition. - N. J. A. Sloane, Aug 13 2019

Examples

			First few rows of the triangle are:
  1;
  1, 1;
  1, 2,  3;
  1, 3,  6,   4;
  1, 4, 11,  14,   7;
  1, 5, 18,  36,  34,  11;
  1, 6, 27,  76, 119,  82,  18;
  1, 7, 38, 140, 322, 393, 198, 29;
  ...
For example, T(7,4) = 76 = f(4), x^3 + 3*x = 64 + 12 = 76.
		

Crossrefs

Cf. A000204 (diagonal), A059100 (column 3), A061989 (column 4).

Programs

  • Maple
    Lucas := proc(n,x) # see A114525
        option remember;
        if  n=0 then
            2;
        elif n =1 then
            x ;
        else
            x*procname(n-1,x)+procname(n-2,x) ;
        end if;
        expand(%) ;
    end proc:
    A117938 := proc(n::integer,k::integer)
        if k = 1 then
            1;
        else
            subs(x=n-k+1,Lucas(k-1,x)) ;
        end if;
    end proc:
    seq(seq(A117938(n,k),k=1..n),n=1..12) ; # R. J. Mathar, Aug 16 2019
  • Mathematica
    T[n_, k_]:= LucasL[k-1, n-k+1] - Boole[k==1];
    Table[T[n, k], {n, 12}, {k, n}]//Flatten (* G. C. Greubel, Oct 28 2021 *)
  • Sage
    def A117938(n,k): return 1 if (k==1) else round(2^(1-k)*( (n-k+1 + sqrt((n-k)*(n-k+2) + 5))^(k-1) + (n-k+1 - sqrt((n-k)*(n-k+2) + 5))^(k-1) ))
    flatten([[A117938(n,k) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Oct 28 2021

Formula

Columns are f(x), x = 1, 2, 3, ..., of the Lucas Polynomials: (1, defined different from A034807 and A114525); (x); (x^2 + 2); (x^3 + 3*x); (x^4 + 4*x^2 + 2); (x^5 + 5*x^3 + 5*x); (x^6 + 6*x^4 + 9*x^2 + 2); (x^7 + 7*x^5 + 14*x^3 + 7*x); ...

Extensions

Terms a(51) and a(52) corrected by G. C. Greubel, Oct 28 2021

A117936 Triangle, rows = inverse binomial transforms of A073133 columns.

Original entry on oeis.org

1, 1, 1, 2, 3, 2, 3, 9, 12, 6, 5, 24, 56, 60, 24, 8, 62, 228, 414, 360, 120, 13, 156, 864, 2400, 3480, 2520, 720, 21, 387, 3132, 12606, 27360, 32640, 20160, 5040, 34, 951, 11034, 62220, 190704, 335160, 337680, 181440, 40320, 55, 2323, 38136, 294588, 1229760, 2997120, 4394880, 3820320, 1814400, 362880
Offset: 1

Views

Author

Gary W. Adamson, Apr 03 2006

Keywords

Comments

Left border of the triangle = Fibonacci numbers, right border = factorials. Companion triangle A117937 is generated from Lucas polynomials, using analogous operations.
Note that binomial transforms are defined from offset 1 here. - R. J. Mathar, Aug 16 2019

Examples

			First few columns of A073133 are: (1, 1, 1, ...); (1, 2, 3, ...); (2, 5, 10, 17, ...); (3, 12, 33, 72, ...). As sequences, these are f(x), Fibonacci polynomials: (1); (x); (x^2 + 1); (x^3 + 2*x); (x^4 + 3*x^2 + 1); (x^5 + 4*x^3 + 3*x); ... For example, f(x), x = 1,2,3,... using (x^4 + 3*x^2 + 1) generates Column 5 of A073133: (5, 29, 109, 305, ...).
Inverse binomial transforms of the foregoing columns generates the triangle rows:
  1;
  1,  1;
  2,  3,   2;
  3,  9,  12,   6;
  5, 24,  56,  60,  24;
  8, 62, 228, 414, 360, 120;
  ...
		

Crossrefs

Cf. A006684 (column 2), A309717 (column 3 halved).

Programs

  • Maple
    A117936 := proc(n,k)
        add( A073133(i+1,n)*binomial(k-1,i)*(-1)^(i-k-1),i=0..k-1) ;
    end proc:
    seq(seq(A117936(n,k),k=1..n),n=1..13) ; # R. J. Mathar, Aug 16 2019
  • Mathematica
    (* A = A073133 *) A[, 1] = 1; A[n, k_] := A[n, k] = If[k < 0, 0, n A[n, k - 1] + A[n, k - 2]];
    T[n_, k_] := Sum[A[i+1, n] Binomial[k-1, i] (-1)^(i - k - 1), {i, 0, k-1}];
    Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, Apr 01 2020, from Maple *)
  • Sage
    @CachedFunction
    def A073133(n,k): return 0 if (k<0) else 1 if (k==1) else n*A073133(n,k-1) + A073133(n,k-2)
    def A117936(n,k): return sum( (-1)^(j-k+1)*binomial(k-1, j)*A073133(j+1,n) for j in (0..k-1) )
    flatten([[A117936(n,k) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Oct 23 2021

Formula

Inverse binomial transforms of A073133 columns. Such columns are f(x), Fibonacci polynomials.
Showing 1-3 of 3 results.