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

A129707 Number of inversions in all Fibonacci binary words of length n.

Original entry on oeis.org

0, 0, 1, 4, 12, 31, 73, 162, 344, 707, 1416, 2778, 5358, 10188, 19139, 35582, 65556, 119825, 217487, 392286, 703618, 1255669, 2230608, 3946020, 6954060, 12212280, 21377365, 37309288, 64935132, 112726771, 195224773, 337343034, 581700476
Offset: 0

Views

Author

Emeric Deutsch, May 12 2007

Keywords

Comments

A Fibonacci binary word is a binary word having no 00 subword.

Examples

			a(3)=4 because the Fibonacci words 110,111,101,010,011 have a total of 2 + 0 + 1 + 1 + 0 = 4 inversions.
		

Crossrefs

Cf. A129706.
Cf. A055243.

Programs

  • Maple
    with(combinat): a[0]:=0: a[1]:=0: a[2]:=1: a[3]:=4: for n from 4 to 40 do a[n]:=2*a[n-1]+a[n-2]-2*a[n-3]-a[n-4]+fibonacci(n) od: seq(a[n],n=0..40);
  • Mathematica
    CoefficientList[Series[x^2*(1 + x)/(1 - x - x^2)^3, {x,0,50}], x] (* G. C. Greubel, Mar 04 2017 *)
  • Maxima
    a(n) = sum(k*(k+1)*binomial(k,n-k-1),k,floor((n-1)/2),n-1)/2; /* Vladimir Kruchinin, Sep 17 2020 */
  • PARI
    x='x+O('x^50); concat([0,0], Vec(x^2*(1 + x)/(1 - x - x^2)^3)) \\ G. C. Greubel, Mar 04 2017
    

Formula

a(n) = Sum_{k>=0} k*A129706(n,k).
G.f.: z^2*(1+z)/(1-z-z^2)^3.
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) - a(n-4) + F(n), a(0)=a(1)=0, a(2)=1, a(3)=4.
a(n-3) = ((5*n^2 - 37*n + 50)*F(n-1) + 4*(n-1)*F(n))/50 = (-1)^n*A055243(-n). - Peter Bala, Oct 25 2007
a(n) = A001628(n-3) + A001628(n-2). - R. J. Mathar, Dec 07 2011
a(n+1) = A123585(n+2,n). - Philippe Deléham, Dec 18 2011
a(n) = Sum_{k=floor((n-1)/2)..n-1} k*(k+1)/2*C(k,n-k-1). - Vladimir Kruchinin, Sep 17 2020

A202390 Triangle T(n,k), read by rows, given by (1, 0, 1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 1, -1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 1, 6, 8, 3, 1, 10, 21, 17, 5, 1, 15, 45, 58, 35, 8, 1, 21, 85, 154, 144, 68, 13, 1, 28, 147, 350, 452, 330, 129, 21, 1, 36, 238, 714, 1195, 1198, 719, 239, 34, 1, 45, 366, 1344, 2799, 3611, 2959, 1506, 436, 55
Offset: 0

Views

Author

Philippe Deléham, Dec 18 2011

Keywords

Comments

T(n,n) = Fibonacci(n+1) = A000045(n+1).
A202390 is jointly generated with A208340 as an array of coefficients of polynomials v(n,x): initially, u(1,x)=v(1,x)=1; for n>1, u(n,x)=u(n-1,x)+x*v(n-1)x and v(n,x)=(x+1)*u(n-1,x)+(x+1)v(n-1,x). The alternating row sums of A202390, and also A208340, are 0 except for the first one. See the Mathematica section. - Clark Kimberling, Feb 27 2012

Examples

			Triangle begins:
  1
  1, 1
  1, 3, 2
  1, 6, 8, 3
  1, 10, 21, 17, 5
  1, 15, 45, 58, 35, 8
  1, 21, 85, 154, 144, 68, 13
  1, 28, 147, 350, 452, 330, 129, 21
		

Crossrefs

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 13;
    u[n_, x_] := u[n - 1, x] + x*v[n - 1, x];
    v[n_, x_] := (x + 1)*u[n - 1, x] + (x + 1)*v[n - 1, x];
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]  (* A202390 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]  (* A208340 *)
    Table[u[n, x] /. x -> 1, {n, 1, z}]  (*row sums*)
    Table[u[n, x] /. x -> -1, {n, 1, z}] (*alt. row sums*)

Formula

T(n,k) = 2*T(n-1,k) + T(n-1,k-1) + T(n-2,k-2) - T(n-2,k) with T(0,0) = T(1,0) = T(1,1) = 1 and T(n,k) = 0 if k<0 or if n
G.f.: (1-x)/(1-(2+y)*x+(1-y^2)*x^2).
Sum_{k, 0<=k<=n} T(n,k)*x^k = (-1)^n*A108411(n), A000007(n), A000012(n), A025192(n), A122558(n) for x = -2, -1, 0, 1, 2 respectively.

A202395 Triangle T(n,k), read by rows, given by (1, 1, 1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 1, -1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 1, 1, 2, 4, 2, 5, 13, 11, 3, 13, 40, 46, 24, 5, 34, 120, 172, 128, 50, 8, 89, 354, 603, 572, 319, 98, 13, 233, 1031, 2025, 2311, 1651, 733, 187, 21, 610, 2972, 6592, 8740, 7548, 4324, 1600, 348, 34
Offset: 0

Author

Philippe Deléham, Dec 18 2011

Keywords

Comments

T(n,n) = Fibonacci(n+1) = A000045(n+1).

Examples

			Triangle begins :
1
1, 1
2, 4, 2
5, 13, 11, 3
13, 40, 46, 24, 5
34, 120, 172, 128, 50, 8
89, 354, 603, 572, 319, 98, 13
		

Crossrefs

Formula

T(n,k) = 3*T(n-1,k) + T(n-1,k-1) + T(n-2,k-2) - T(n-2,k) with T(0,0) = T(1,0) = T(1,1) = 1 and T(n,k) = 0 if k<0 or if n
G.f.: (1-2*x)/(1-(3+y)*x+(1-y^2)*x^2).
Sum_{k, 0<=k<=n} T(n,k)*x^k = A000007(n), A001519(n), A081294(n), A180036(n) for x = -1, 0, 1, 2 respectively.

A201947 Triangle T(n,k), read by rows, given by (1,1,-1,0,0,0,0,0,0,0,...) DELTA (1,-1,1,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 1, 1, 2, 2, 0, 3, 5, 1, -1, 5, 10, 4, -2, -1, 8, 20, 12, -4, -4, 0, 13, 38, 31, -4, -13, -2, 1, 21, 71, 73, 3, -33, -11, 3, 1, 34, 130, 162, 34, -74, -42, 6, 6, 0, 55, 235, 344, 128, -146, -130, 0, 24, 3, -1
Offset: 0

Author

Philippe Deléham, Dec 06 2011

Keywords

Comments

Row-reversed variant of A123585. Row sums: 2^n.

Examples

			Triangle begins:
1
1, 1
2, 2, 0
3, 5, 1, -1
5, 10, 4, -2, -1
8, 20, 12, -4, -4, 0
13, 38, 31, -4, -13, -2, 1
21, 71, 73, 3, -33, -11, 3, 1
34, 130, 162, 34, -74, -42, 6, 6, 0
55, 235, 344, 128, -146, -130, 0, 24, 3, -1
		

Crossrefs

Cf. Columns: A000045, A001629, A129707.
Diagonals: A010892, A099254, Antidiagonal sums: A158943.

Formula

G.f.: 1/(1-(1+y)*x+(y+1)*(y-1)*x^2).
T(n,0) = A000045(n+1).
T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k) - T(n-2,k-2) with T(0,0)= 1 and T(n,k)= 0 if n
Sum_{k, 0<=k<=n} T(n,k)*x^k = (-1)^n*A090591(n), (-1)^n*A106852(n), A000007(n), A000045(n+1), A000079(n), A057083(n), A190966(n+1) for n = -3, -2, -1, 0, 1, 2, 3 respectively.
Sum_{k, 0<=k<=n} T(n,k)*x^(n-k) = A010892(n), A000079(n), A030195(n+1), A180222(n+2) for x = 0, 1, 2, 3 respectively.

A202389 Triangle T(n,k), read by rows, given by (1, -2, 1, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 1, -1, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 1, 1, -1, 1, 2, -1, -2, 2, 3, 1, -2, -5, 3, 5, 1, 3, -5, -10, 5, 8, -1, 3, 9, -10, -20, 8, 13, -1, -4, 9, 22, -20, -38, 13, 21, 1, -4, -14, 22, 51, -38, -71, 21, 34, 1, 5, -14, -40, 51, 111, -71, -130, 34, 55
Offset: 0

Author

Philippe Deléham, Dec 18 2011

Keywords

Comments

T(n,n) = A000045(n+1) = Fibonacci(n+1).

Examples

			Triangle begins :
1
1, 1
-1, 1, 2
-1, -2, 2, 3
1, -2, -5, 3, 5
1, 3, -5, -10, 5, 8
-1, 3, 9, -10, -20, 8, 13
		

Programs

  • Mathematica
    With[{m = 9}, CoefficientList[CoefficientList[Series[(1+x)/(1-y*x+(1-y^2)*x
    ^2), {x, 0 , m}, {y, 0, m}], x], y]] // Flatten (* Georg Fischer, Feb 17 2020 *)
  • PARI
    T(n,k) = if (k<0, 0, if (nMichel Marcus, Feb 17 2020

Formula

T(n,k) = T(n-1,k-1) + T(n-2,k-2) - T(n-2,k) with T(0,0) = T(1,0) = T(1,1) = 1 and T(n,k) = 0 if k<0 or if n
G.f.: (1+x)/(1-y*x+(1-y^2)*x^2).
Sum_{k=0..n} T(n,k)*x^k = (-1)^n*A046717(n), A000007(n), A057077(n), A040000(n), A000244(n) for x = -2, -1, 0, 1, 2 respectively.

Extensions

a(52) corrected by Georg Fischer, Feb 17 2020
Showing 1-5 of 5 results.