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.

A120987 Triangle read by rows: T(n,k) is the number of ternary words of length n with k strictly increasing runs (0 <= k <= n; for example, the ternary word 2|01|12|02|1|1|012|2 has 8 strictly increasing runs).

Original entry on oeis.org

1, 0, 3, 0, 3, 6, 0, 1, 16, 10, 0, 0, 15, 51, 15, 0, 0, 6, 90, 126, 21, 0, 0, 1, 77, 357, 266, 28, 0, 0, 0, 36, 504, 1107, 504, 36, 0, 0, 0, 9, 414, 2304, 2907, 882, 45, 0, 0, 0, 1, 210, 2850, 8350, 6765, 1452, 55, 0, 0, 0, 0, 66, 2277, 14355, 25653, 14355, 2277, 66, 0, 0, 0, 0, 12
Offset: 0

Views

Author

Emeric Deutsch, Jul 23 2006

Keywords

Comments

Sum of entries in row n is 3^n (A000244).
Sum of entries in column k is A099464(k+1) (a trisection of the tribonacci numbers).
Row n contains 1 + floor(2n/3) nonzero terms.
T(n,n) = (n+1)*(n+2)/2 (the triangular numbers (A000217)).
Sum_{k=0..n} k*T(n,k) = (2n+1)*3^(n-1) = 3*A081038(n-1) for n >= 1.
T(n,k) = A120987(n,n-k).

Examples

			T(5,2) = 6 because we have 012|01, 012|02, 012|12, 01|012, 02|012 and 12|012 (the runs are separated by |).
Triangle starts:
  1;
  0,   3;
  0,   3,   6;
  0,   1,  16,  10;
  0,   0,  15,  51,  15;
  0,   0,   6,  90, 126,  21;
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 2nd. ed., 1994, p. 24, p. 154.

Crossrefs

Nb(s,2,q) = A027907(q,s). - Giuliano Cabrele, Dec 11 2015

Programs

  • Maple
    G:=1/(1-3*t*z-3*t*(1-t)*z^2-t*(1-t)^2*z^3): Gser:=simplify(series(G,z=0,33)): P[0]:=1: for n from 1 to 13 do P[n]:=sort(coeff(Gser,z^n)) od: for n from 0 to 12 do seq(coeff(P[n],t,j),j=0..n) od; # yields sequence in triangular form
  • Mathematica
    Flatten[Table[Sum[(-1)^j*Binomial[n + 1, j]*Binomial[3 k - 3 j, n], {j, 0, k}], {n, 0, 10}, {k, 0, n}]] (* G. C. Greubel, Dec 20 2015 *)
  • MuPAD
    // binomial c. defined as in linked document
    Cb:=(x,m)->if(0<=m and is(m in Z), binomial(x,m), 0):
    // closed formula derived and proved in the linked document
    // Qsc(r,q,m) with r=2
    T(n,k):=(n,k)->_plus((-1)^(k-j)*Cb(n+1,k-j)*Cb(3*j, n)$j=0..k):
    // Giuliano Cabrele, Dec 11 2015

Formula

T(n,k) = trinomial(n+1,3n-3k+2) = trinomial(n+1,3k-n) (conjecture).
G.f.: 1/(1-3tz-3t(1-t)z^2-t(1-t)^2*z^3).
Can anyone prove the conjecture (either from the g.f. or combinatorially from the definition)?
From Giuliano Cabrele, Mar 02 2008: (Start)
The conjecture is compatible with the g.f., which can be rewritten as (1-t)/(1-t(1+(1-t)z)^3) and expanded to give T(n,k) = Sum_{j=0..k} (-1)^(k-j)*C(3j, n)*C(n+1, k-j) = Sum_{j=0..k} (-1)^j*C(n+1,j)*C(3k-3j,n) = trinomial(n+1,3k-n) = A027907(n+1,3k-n).
Also (1-t)/(1-t(1+(1-t)z)^2) equals the g.f. for the case of binary words, A119900, where Sum_{j=0..k} (-1)^(k-j)*C(2j,n)*C(n+1,k-j) = C(n+1,2k-n). Changing the exponent to 1 gives 1/(1-zt), the g.f. for the case of unary words, the expansion coefficients of which can be written as Kronecker delta(k-n)^(n+1) = Sum_{j=0..k} (-1)^(k-j)*C(j, n)*C(n+1,k-j).
So the conjecture shifts to that the g.f. is (1-t)/(1-t(1+(1-t)z)^m) and coefficients T(m,n,k) = Sum_{j=0..k} (-1)^(k-j)*C(mj,n)*C(n+1, k-j) may apply to the general case of m-ary words. (End)
Sum_{k=0..n} T(n,k) *(-1)^(n-k) = A157241(n+1). - Philippe Deléham, Oct 25 2011
The generalized conjecture above can in fact be proved, as described in the file "Words Partitioned according to Number of Strictly Increasing Runs" linked above. - Giuliano Cabrele, Dec 11 2015

A157240 a(n) = A128018(n) + 1.

Original entry on oeis.org

2, -1, -7, -7, 17, 65, 65, -127, -511, -511, 1025, 4097, 4097, -8191, -32767, -32767, 65537, 262145, 262145, -524287, -2097151, -2097151, 4194305, 16777217, 16777217, -33554431, -134217727, -134217727, 268435457, 1073741825
Offset: 0

Views

Author

Creighton Dement, Feb 25 2009

Keywords

Comments

Generating floretion is Y = .5('i + 'j + 'k + i' + j' + k') + ee. ("tes"). Note: A current conjecture is that if X is a floretion for which 4*tes(X^n) is an integer for all n, then X+sigma(X) also has this property. "sigma" is the uniquely defined projection operator which "flips the arrows" of a floretion (i.e. sigma('i) = i', sigma('j) = j', etc.). Taking X = .5('i + 'j + 'k + ee), then tesseq(X) = [ -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, ...] is an integer sequence, thus by the conjecture 4*tes(Y^n) = 4*tes((X+sigma)^n) should also be an integer sequence for all n.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3,-6,4},{2,-1,-7},40] (* Harvey P. Dale, May 30 2021 *)
  • PARI
    Vec((2 - 7*x + 8*x^2) / ((1 - x)*(1 - 2*x + 4*x^2)) + O(x^35)) \\ Colin Barker, May 22 2019

Formula

G.f.: (2-7*x+8*x^2) / ((1-x)*(4*x^2-2*x+1)).
From Colin Barker, May 22 2019: (Start)
a(n) = (2 + (1-i*sqrt(3))^(1+n) + (1+i*sqrt(3))^(1+n)) / 2 where i=sqrt(-1).
a(n) = 3*a(n-1) - 6*a(n-2) + 4*a(n-3) for n>2.
(End)
a(n) = A138230(n+1)+1. - R. J. Mathar, Sep 11 2019

A287479 Expansion of g.f. (x + x^2)/(1 + 3*x^2).

Original entry on oeis.org

0, 1, 1, -3, -3, 9, 9, -27, -27, 81, 81, -243, -243, 729, 729, -2187, -2187, 6561, 6561, -19683, -19683, 59049, 59049, -177147, -177147, 531441, 531441, -1594323, -1594323, 4782969, 4782969, -14348907, -14348907, 43046721, 43046721, -129140163, -129140163, 387420489
Offset: 0

Views

Author

Keywords

Comments

This is the inverse binomial transform of A157241.
Successive differences of A157241 begin:
0, 1, 3, 3, -5, -21, -21, 43, 171, 171, ... = A157241
1, 2, 0, -8, -16, 0, 64, 128, 0, -512, ... = A088138
1, -2, -8, -8, 16, 64, 64, -128, -512, -512, ... = A138230
-3, -6, 0, 24, 48, 0, -192, -384, 0, 1536, ...
-3, 6, 24, 24, -48, -192, -192, 384, 1536, 1536, ...
9, 18, 0, -72, -144, 0, 576, 1152, 0, -4608, ...
9, -18, -72 -72, 144, 576, 576, -1152, -4608, -4608, ...
...
a(n) is the n-th term of the first column.
Successive differences of a(n) begin:
0, 1, 1, -3, -3, 9, 9, -27, -27, 81, ...
1, 0, -4, 0, 12, 0, -36, 0, 108, 0, ...
-1, -4, 4, 12, -12, -36, 36, 108, -108, -324, ...
-3, 8, 8, -24, -24, 72, 72, -216, -216, 648, ...
11, 0, -32, 0, 96, 0, -288, 0, 864, 0, ...
-11, -32, 32, 96, -96, -288, 288, 864, -864, -2592, ...
-21, 64, 64, -192, -192, 576, 576, -1728, -1728, 5184, ...
85, 0, -256, 0, 768, 0, -2304, 0, 6912, 0, ...
...
First column appears to be a subsequence of Jacobsthal numbers A001045 (the trisection A082311 is missing), second column is A104538, and third column is A137717.
a(n) = A128019(n-2) for n > 2. - Georg Fischer, Oct 23 2018

Crossrefs

Programs

  • Mathematica
    Join[{0}, LinearRecurrence[{0, -3}, {1, 1}, 40]]
    (* or, computation from b = A157241 : *)
    b[n_] := (Switch[Mod[n, 3], 0, (-1)^((n + 3)/3), 1, (-1)^((n + 5)/3), 2, (-1)^((n + 4)/3)*2]*2^n + 1)/3; tb = Table[b[n], {n, 0, 40}]; Table[ Differences[tb, n], {n, 0, 40}][[All, 1]]
  • PARI
    concat([0], Vec((x + x^2)/(1 + 3*x^2) + O(x^40))) \\ Felix Fröhlich, Oct 23 2018

Formula

a(n) = -3*a(n-2) for n > 2.
E.g.f.: (1 - cos(sqrt(3)*x) + sqrt(3)*sin(sqrt(3)*x))/3. - Stefano Spezia, Jul 15 2024
Showing 1-3 of 3 results.