login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A119851 Triangle read by rows: T(n,k) is the number of ternary words of length n containing k 012's (n>=0, 0<=k<=floor(n/3)). 1
1, 3, 9, 26, 1, 75, 6, 216, 27, 622, 106, 1, 1791, 387, 9, 5157, 1350, 54, 14849, 4566, 267, 1, 42756, 15102, 1179, 12, 123111, 49113, 4833, 90, 354484, 157622, 18798, 536, 1, 1020696, 500520, 70317, 2775, 15, 2938977, 1575558, 255231, 13068, 135 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Row n has 1+floor(n/3) terms.

Sum of entries in row n is 3^n (A000244).

Sum(k*T(n,k),k>=0) = (n-2)*3^(n-3) = A027741(n-1).

LINKS

Table of n, a(n) for n=0..44.

FORMULA

T(n,k) = \sum_{j=0}^{n-3k}  binomial(-(k-1),j) * binomial(j,(n-3k-j)/2) *

(-3)^((3j+3k-n)/2) [From Max Alekseyev]

G.f. G(t,z)=1/(1-3z+z^3-tz^3).

Recurrence relation: T(n,k) = 3*T(n-1,k)-T(n-3,k)+T(n-3,k-1) for n>=3.

EXAMPLE

T(4,1)=6 because we have 0012, 0120, 0121, 0122, 1012 and 2012.

Triangle starts:

1;

3;

9;

26,1;

75,6;

216,27;

622,106,1;

MAPLE

G:=1/(1-3*z+z^3-t*z^3): Gser:=simplify(series(G, z=0, 20)): P[0]:=1: for n from 1 to 15 do P[n]:=sort(coeff(Gser, z^n)) od: for n from 0 to 15 do seq(coeff(P[n], t, j), j=0..floor(n/3)) od; # yields sequence in triangular form

PROG

(PARI) { T(n, k) = sum(j=0, n-3*k, if((n-3*k-j)%2, 0, binomial(-(k-1), j) *

binomial(j, (n-3*k-j)/2) * (-3)^((3*j+3*k-n)/2) )) } \\ From Max Alekseyev

CROSSREFS

Cf. A000244, A076264 (=T(n,0)), A119852 (=T(n,1)), A027741.

Sequence in context: A074440 A006204 A013572 * A119825 A235538 A218916

Adjacent sequences:  A119848 A119849 A119850 * A119852 A119853 A119854

KEYWORD

nonn,tabf

AUTHOR

Emeric Deutsch, May 26 2006

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified November 20 04:05 EST 2017. Contains 294959 sequences.