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.

A209240 Triangular array read by rows. T(n,k) is the number of ternary length-n words in which the longest run of consecutive 0's is exactly k; n>=0, 0<=k<=n.

Original entry on oeis.org

1, 2, 1, 4, 4, 1, 8, 14, 4, 1, 16, 44, 16, 4, 1, 32, 132, 58, 16, 4, 1, 64, 384, 200, 60, 16, 4, 1, 128, 1096, 668, 214, 60, 16, 4, 1, 256, 3088, 2180, 740, 216, 60, 16, 4, 1, 512, 8624, 6992, 2504, 754, 216, 60, 16, 4, 1, 1024, 23936, 22128, 8332, 2576, 756, 216, 60, 16, 4, 1
Offset: 0

Views

Author

Geoffrey Critzer, Jan 13 2013

Keywords

Comments

Row sums are 3^n.
Column k=0 is A000079.
Column k=1 is A094309.
Limit of reversed rows gives A120926.

Examples

			1;
2,   1;
4,   4,    1;
8,   14,   4,    1;
16,  44,   16,   4,   1;
32,  132,  58,   16,  4,   1;
64,  384,  200,  60,  16,  4,  1;
128, 1096, 668,  214, 60,  16, 4,  1;
256, 3088, 2180, 740, 216, 60, 16, 4,  1;
		

Crossrefs

Cf. A048004.

Programs

  • Mathematica
    nn=10;f[list_]:=Select[list,#>0&];Map[f,Transpose[Table[CoefficientList[ Series[(1-x^k)/(1-3x+2x^(k+1))-(1-x^(k-1))/(1-3x+2x^k),{x,0,nn}],x],{k,1,nn+1}]]]//Grid

Formula

O.g.f. for column k: (1-x)^2*x^k/(1-3*x+2*x^(k+1))/(1-3*x+2*x^(k+2)).

A176758 a(n) = Sum_{k=0..floor((n-1)/2)} (3^k-1)*binomial(n, 2*k+1).

Original entry on oeis.org

2, 8, 28, 88, 264, 768, 2192, 6176, 17248, 47872, 132288, 364416, 1001600, 2748416, 7532800, 20627968, 56452608, 154423296, 422276096, 1154447360, 3155544064, 8624177152, 23567831040, 64400793600, 175970803712, 480810303488
Offset: 3

Views

Author

Roger L. Bagula, Apr 25 2010

Keywords

Crossrefs

Programs

  • Magma
    I:=[2,8,28]; [n le 3 select I[n] else 4*Self(n-1) - 2*Self(n-2) +4*Self(n-3): n in [1..31]]; // G. C. Greubel, Sep 17 2021
    
  • Mathematica
    (* First program *)
    a[n_, q_]:= Sum[(q^((m-1)/2) - 1)*Binomial[n, m], {m,1,n,2}];
    Table[a[n, 3], {n, 3, 30}]
    (* Second program *)
    A002605[n_]:= (-I*Sqrt[2])^(n-1)*ChebyshevU[n-1, I/Sqrt[2]];
    Table[(Boole[n==0] - 2^n)/2 + A002605[n], {n, 3, 30}] (* G. C. Greubel, Sep 17 2021 *)
  • Sage
    [(-i*sqrt(2))^(n-1)*chebyshev_U(n-1, i/sqrt(2)) - 2^(n-1) for n in (3..30)] # G. C. Greubel, Sep 17 2021

Formula

From R. J. Mathar, Jan 29 2012: (Start)
a(n) = A002605(n) - 2^(n-1) = 2*A094309(n).
G.f.: 2*x^3/( (1-2*x)*(1-2*x-2*x^2) ). (End)
Showing 1-2 of 2 results.