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.

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

Original entry on oeis.org

1, 1, 3, 6, 14, 31, 70, 157, 353, 793, 1782, 4004, 8997, 20216, 45425, 102069, 229347, 515338, 1157954, 2601899, 5846414, 13136773, 29518061, 66326481, 149034250, 334876920, 752461609, 1690765888, 3799116465, 8536537209, 19181424995, 43100270734, 96845429254
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

Let u(k), v(k), w(k) be defined by u(1)=1, v(1)=0, w(1)=0 and u(k+1)=u(k)+v(k)+w(k), v(k+1)=u(k)+v(k), w(k+1)=u(k); then {u(n)} = 1,1,3,6,14,31,... (A006356 with an extra initial 1), {v(n)} = 0,1,2,5,11,25,... (A006054 with its initial 0 deleted) and {w(n)} = {u(n)} prefixed by an extra 0 = this sequence with an extra initial 0. - Benoit Cloitre, Apr 05 2002 [Also u(k)^2+v(k)^2+w(k)^2 = u(2k). - Gary W. Adamson, Dec 23 2003]
Form the graph with matrix A=[1, 1, 1; 1, 0, 0; 1, 0, 1]. Then A077998 counts closed walks of length n at the vertex of degree 4. - Paul Barry, Oct 02 2004
a(n) is the number of Motzkin (n+2)-sequences with no flatsteps at ground level and whose height is <=2. For example, a(3)=6 counts UDUFD, UFDUD, UFFFD, UFUDD, UUDFD, UUFDD. - David Callan, Dec 09 2004
Number of compositions of n if there are two kinds of part 2. Example: a(3)=6 because we have (3),(1,2),(1,2'),(2,1),(2',1) and (1,1,1). Row sums of A105477. - Emeric Deutsch, Apr 09 2005
Diagonal sums of A056242. - Paul Barry, Dec 26 2007
Diagonal sums of triangle in A105306. - Philippe Deléham, Nov 16 2008
a(n) appears in the formula for the nonpositive powers of rho:= 2*cos(Pi/7), the ratio of the smaller diagonal in the heptagon to the side length s=2*sin(Pi/7), when expressed in the basis <1,rho,sigma>, with sigma:=rho^2-1, the ratio of the larger heptagon diagonal to the side length, as follows. rho^(-n) = a(n)*1 + a(n-1)*rho - C(n)*sigma, n>=0, with C(n)=A006054(n+1). Put a(-1):=0. See the Steinbach reference, and a comment under A052547.
The limit a(n+1)/a(n) for n -> infinity is sigma = rho^2-1, approximately 2.246979603. See a Nov 07 2013 comment on A006054 for the proof, and the preceding comment for rho and sigma and the P. Steinbach reference. - Wolfdieter Lang, Nov 07 2013
From Greg Dresden and Aaron Zhou, Jun 15 2023: (Start)
a(n) is the number of ways to tile a skew double-strip of 3*n cells using all possible "trominos". Here is the skew double-strip corresponding to n=4, with 12 cells:
_ ___ _ ___ _ ___
| | | | | | |
|__|___|_|___| |___|
| | | | | | |
|_|___|_|___|_|___|,
and here are the three possible "tromino" tiles, which can be rotated or reflected as needed:
_ _
| | | |
|__|_ ___|___| _________
| | | | | | | | | |
|_|___|, |_|___| , |_|___|_|.
As an example, here is one of the a(4) = 14 ways to tile the skew double-strip of 12 cells:
_ ___ _____ _______
| | | | |
| | |___ | |
| | | | |
|_____|_______|_|___|. (End)

Examples

			G.f. = 1 + x + 3*x^2 + 6*x^3 + 14*x^4 + 31*x^5 + 70*x^6 + 157*x^7 + 353*x^8 + ... - _Michael Somos_, Dec 12 2023
		

References

  • Kenneth Edwards, Michael A. Allen, A new combinatorial interpretation of the Fibonacci numbers squared, Part II, Fib. Q., 58:2 (2020), 169-177.
  • Jay Kappraff, Beyond Measure, A Guided Tour Through Nature, Myth and Number, World Scientific, 2002.

Crossrefs

Apart from initial term, same as A006356, which is the main entry for this sequence. A106803 is yet another version.

Programs

  • GAP
    a:=[1,1,3];; for n in [4..40] do a[n]:=2*a[n-1]+a[n-2]-a[n-3]; od; a; # G. C. Greubel, Jun 27 2019
  • Magma
    I:=[1,1,3]; [n le 3 select I[n] else 2*Self(n-1)+Self(n-2)-Self(n-3): n in [1..40]]; // Vincenzo Librandi, Jun 01 2017
    
  • Mathematica
    CoefficientList[Series[(1-x)/(1-2*x-x^2+x^3), {x, 0, 40}], x] (* Stefan Steinerberger, Sep 11 2006 *)
    LinearRecurrence[{2,1,-1},{1,1,3},40] (* Roman Witula, Aug 07 2012 *)
    a[ n_] := {1, 0, 0} . MatrixPower[{{0, 1, 0}, {0, 0, 1}, {-1, 1, 2}}, n] . {1, 1, 3}; (* Michael Somos, Dec 12 2023 *)
  • PARI
    a(n)=([0,1,0; 0,0,1; -1,1,2]^n*[1;1;3])[1,1] \\ Charles R Greathouse IV, May 10 2016
    
  • SageMath
    ((1-x)/(1-2*x-x^2+x^3)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jun 27 2019
    

Formula

a(0)=a(1)=1, a(2)=3, a(n+1) = 2*a(n) + a(n-1) - a(n-2) for n>=2. - Philippe Deléham, Sep 07 2006
7*a(n) = (s(2))^2*(1+c(1))^n + (s(4))^2*(1+c(2))^n + (s(1))^2(1+c(4))^n, where c(j) = 2*Cos(2Pi*j/7) and s(j) = 2*Sin(2Pi*j/7) - for the proof of this one and many other relations for the sequences u(k), v(k) and w(k) defined on the top of the comments by Benoit Cloitre - see Witula et al.'s paper. - Roman Witula, Aug 07 2012
a(n) = b(n+2)- b(n+1), first differences of b(n) = A006054(n). - Wolfdieter Lang, Nov 07 2013; corrected by Kai Wang, May 31 2017
a(n) = A096976(-n) for all n in Z. - Michael Somos, Dec 12 2023

Extensions

Edited by N. J. A. Sloane, Aug 08 2008 at the suggestion of R. J. Mathar