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.

A207606 Triangle of coefficients of polynomials u(n,x) jointly generated with A207607; see the Formula section.

Original entry on oeis.org

1, 2, 3, 2, 4, 7, 2, 5, 16, 11, 2, 6, 30, 36, 15, 2, 7, 50, 91, 64, 19, 2, 8, 77, 196, 204, 100, 23, 2, 9, 112, 378, 540, 385, 144, 27, 2, 10, 156, 672, 1254, 1210, 650, 196, 31, 2, 11, 210, 1122, 2640, 3289, 2366, 1015, 256, 35, 2, 12, 275, 1782, 5148, 8008
Offset: 1

Views

Author

Clark Kimberling, Feb 19 2012

Keywords

Comments

As triangle T(n,k) with 0 <= k <= n, it is (2, -1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Mar 03 2012

Examples

			First five rows:
  1;
  2;
  3,  2;
  4,  7,  2;
  5, 16, 11,  2;
Triangle (2, -1/2, 1/2, 0, 0, 0, ...) DELTA (0, 1, 0, 0, 0, 0, ...), 0 <= k <= n, begins:
  1;
  2,   0;
  3,   2,   0;
  4,   7,   2,   0;
  5,  16,  11,   2,   0;
  6,  30,  36,  15,   2,   0;
  7,  50,  91,  64,  19,   2,   0;
  8,  77, 196, 204, 100,  23,   2,   0;
		

Crossrefs

Cf. A207607.

Programs

  • Maple
    T:= proc(n, k) option remember;
          if k<0 or k>n then 0
        elif k=0 then n+2
        elif k=n then 2
        else 2*T(n-1,k) + T(n-1,k-1) - T(n-2,k)
          fi; end:
    1, seq(seq(T(n, k), k=0..n), n=0..10); # G. C. Greubel, Mar 15 2020
  • Mathematica
    (* First program *)
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := u[n - 1, x] + v[n - 1, x]
    v[n_, x_] := x*u[n - 1, x] + (x + 1)*v[n - 1, x]
    Table[Factor[u[n, x]], {n, 1, z}]
    Table[Factor[v[n, x]], {n, 1, z}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]  (* A207606 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]  (* A207607 *)
    (* Second program *)
    T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[k==0, n+2, If[k==n, 2, 2*T[n-1, k] - T[n-2, k] + T[n-1, k-1] ]]]; Join[{1}, Table[T[n, k], {n, 0, 10}, {k, 0, n}]]//Flatten (* G. C. Greubel, Mar 15 2020 *)
  • Python
    from sympy import Poly
    from sympy.abc import x
    def u(n, x): return 1 if n==1 else u(n - 1, x) + v(n - 1, x)
    def v(n, x): return 1 if n==1 else x*u(n - 1, x) + (x + 1)*v(n - 1, x)
    def a(n): return Poly(u(n, x), x).all_coeffs()[::-1]
    for n in range(1, 13): print(a(n)) # Indranil Ghosh, May 28 2017
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k<0 or k>n): return 0
        elif (k==1): return n+1
        elif (k==n): return 2
        else: return 2*T(n-1,k) + T(n-1,k-1) - T(n-2,k)
    [1]+[[T(n, k) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Mar 15 2020

Formula

u(n,x) = u(n-1,x) + v(n-1,x), v(n,x) = x*u(n-1,x) + (x+1)v(n-1,x), where u(1,x)=1, v(1,x)=1.
As triangle T(n,k) with 0 <= k <= n: g.f.: (1-y*x)/(1-(2+y)*x+x^2). - Philippe Deléham, Mar 03 2012
As triangle T(n,k) with 0 <= k <= n: Sum_{k=0..n} T(n,k)*x^k = A132677(n), A000034(n)*A057077(n), A057079(n), A000027(n+1), A001519(n+1), A001075(n), A002310(n), A038725(n), A172968(n) for x = -3, -2, -1, 0, 1, 2, 3, 4, 5 respectively. - Philippe Deléham, Mar 03 2012
T(n,k) = 2*T(n-1,k) + T(n-1,k-1) - T(n-2,k). - Philippe Deléham, Mar 03 2012
T(n,k) = C(n+k-1,2*k+1) + 2*C(n+k-1,2*k), where C is binomial. - Yuchun Ji, May 23 2019
T(n,k) = T(n-1,k) + A207607(n-1,k). - Yuchun Ji, May 28 2019

A200067 Maximum sum of all products of absolute differences and distances between element pairs among the integer partitions of n.

Original entry on oeis.org

0, 0, 0, 1, 3, 6, 12, 20, 30, 45, 63, 84, 112, 144, 180, 225, 275, 330, 396, 468, 546, 637, 735, 840, 960, 1088, 1224, 1377, 1539, 1710, 1900, 2100, 2310, 2541, 2783, 3036, 3312, 3600, 3900, 4225, 4563, 4914, 5292, 5684, 6090, 6525, 6975, 7440, 7936, 8448
Offset: 0

Views

Author

Alois P. Heinz, Nov 13 2011

Keywords

Comments

Also the maximum sum of weighted inversions among the compositions of n where weights are products of absolute differences and distances between the element pairs which are not in sorted order.
a(n) is divisible by at least one triangular number >1 for n>=4. Thus 3 is the only prime in this sequence.

Examples

			a(2) =  0: [1,1]-> 0, [2]-> 0; the maximum is 0.
a(3) =  1: [1,1,1]-> 0, [2,1]-> 1, [3]-> 0; the maximum is 1.
a(4) =  3: [1,1,1,1]-> 0, [2,1,1]-> 1+2 = 3, [2,2]->0, [3,1]->2, [4]->0.
a(5) =  6: [2,1,1,1]-> 1+2+3 = 6, [3,1,1]-> 2 + 2*2 = 2*(1+2) = 6.
a(6) = 12: [3,1,1,1]-> 2 + 2*2 + 2*3 = 2*(1+2+3) = 12.
a(7) = 20: [3,1,1,1,1]-> 2 + 2*2 + 2*3 + 2*4 = 2*(1+2+3+4) = 20.
a(8) = 30: [3,1,1,1,1,1]-> 2*(1+2+3+4+5) = 30, [4,1,1,1,1]-> 3*(1+2+3+4) = 30.
		

Crossrefs

Programs

  • Maple
    a:= n-> (k-> (n-k-1)*k*(k+1)/2)(max(0, floor((2*n-1)/3))):
    seq(a(n), n=0..50);
  • Mathematica
    a[n_] := Max[Table[(n-k-1)*k*(k+1)/2, {k, 0, n}]]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Nov 22 2013, after Alois P. Heinz *)

Formula

G.f.: x^3*(1+x)*(1+x^2)/((1+x+x^2)^2*(x-1)^4).
a(n) = max_{k=0..n} (n-k-1)*k*(k+1)/2.
a(n) = (n-k-1)*k*(k+1)/2 with k = max(0, floor((2*n-1)/3)), or k = A004396(n-1) for n>0.
27*a(n) = (2*n-1)*(n^2-n-1) - A132677(n) - 3*(-1)^n*A099254(n-1). - R. J. Mathar, Mar 14 2025

A191597 Expansion of x*(1+3*x)/ ( (1-4*x)*(1+x+x^2)).

Original entry on oeis.org

0, 1, 6, 21, 85, 342, 1365, 5461, 21846, 87381, 349525, 1398102, 5592405, 22369621, 89478486, 357913941, 1431655765, 5726623062, 22906492245, 91625968981, 366503875926, 1466015503701, 5864062014805, 23456248059222, 93824992236885, 375299968947541
Offset: 0

Views

Author

Paul Curtz, Jun 08 2011

Keywords

Comments

a(n) and successive differences define a square array T(0,k) = a(k), T(n,k) = T(n-1,k+1) - T(n-1,k):
0, 1, 6, 21, 85, 342,...
1, 5, 15, 64, 257, 1023,...
4, 10, 49, 193, 766, 3073,...
As with any sequence which obeys a homogeneous linear recurrence (we say it once, only once and we shall not repeat it), the recurrence is also valid for the rows of such arrays of higher order differences.

Programs

Formula

a(n) = 3*a(n-1) + 3*a(n-2) + 4*a(n-3), n >= 3.
a(n) = A024495(2*n).
a(n) = A113405(2*n) + A113405(2*n+1).
a(n+1) - 4*a(n) = A132677(n).
a(n+3) - a(n) = 21*4^n.
a(n) = A178872(n) + 3*A178872(n-1) = (4^n-A061347(n+1))/3. - R. J. Mathar, Jun 08 2011
Showing 1-3 of 3 results.