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.

A001630 Tetranacci numbers: a(n) = a(n-1) + a(n-2) + a(n-3) + a(n-4), with a(0)=a(1)=0, a(2)=1, a(3)=2.

Original entry on oeis.org

0, 0, 1, 2, 3, 6, 12, 23, 44, 85, 164, 316, 609, 1174, 2263, 4362, 8408, 16207, 31240, 60217, 116072, 223736, 431265, 831290, 1602363, 3088654, 5953572, 11475879, 22120468, 42638573, 82188492, 158423412, 305370945, 588621422, 1134604271, 2187020050
Offset: 0

Views

Author

Keywords

Comments

Also (with a different offset), coordination sequence for (4,infinity,infinity) tiling of hyperbolic plane. - N. J. A. Sloane, Dec 29 2015
Apparently for n>=2 the number of 1-D walks of length n-2 using steps +1, +3 and -1, avoiding consecutive -1 steps. - David Scambler, Jul 15 2013
From Elkhan Aday and Greg Dresden, Jun 24 2024: (Start)
For n > 1, a(n) is the number of ways to tile a skew double-strip of n-1 cells with one extra initial cell, using squares and all possible "dominoes". Here is the skew double-strip corresponding to n=12, with 11 cells:
_ ___ _ ___ _
| | | | | |
_ _|_|___|_|___|_|
| | | | | | |
|_|___|_|___|_|___|,
and here are the three possible "domino" tiles:
_ _
| | | |
| | | | | |
|_|, |_|, |_____|.
As an example, here is one of the a(12) = 609 ways to tile the skew double-strip of 11 cells:
_ _______ _____
| | | | | |
___|_ |_|_ | _| _|
| | | | | |
|_____|___|_|___|_|. (End)

Examples

			G.f. = x^2 + 2*x^3 + 3*x^4 + 6*x^5 + 12*x^6 + 23*x^7 + 44*x^8 + 85*x^9 + ...
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    I:=[0, 0, 1, 2]; [n le 4 select I[n] else Self(n-1)+ Self(n-2) + Self(n-3) + Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jan 29 2013
    
  • Maple
    a:= proc(n) option operator; local M; M := Matrix(4, (i,j)-> if (i=j-1) or j=1 then 1 else 0 fi)^n; M[1,4]+M[1,3] end; seq (a(n), n=0..34); # Alois P. Heinz, Aug 01 2008
  • Mathematica
    a=0; b=0; c=1; d=2; lst={a, b, c, d}; Do[e=a+b+c+d; AppendTo[lst, e]; a=b; b=c; c=d; d=e, {n, 4!}]; lst (* Vladimir Joseph Stephan Orlovsky, Sep 30 2008 *)
    RecurrenceTable[{a[0] == a[1] == 0, a[2] == 1, a[3] == 2, a[n] == a[n - 1] + a[n - 2] + a[n - 3] + a[n - 4]}, a, {n, 35}] (* or *) a = {0, 0, 1, 2}; Do[AppendTo[a, a[[-1]] + a[[-2]] + a[[-3]] + a[[-4]]], {35}]; a (* Bruno Berselli, Jan 29 2013 *)
    CoefficientList[Series[- x^2 * (1 + x)/(- 1 + x + x^2 + x^3 + x^4), {x, 0, 35}], x] (* Vincenzo Librandi, Jan 29 2013 *)
    LinearRecurrence[{1,1,1,1},{0,0,1,2},40] (* Harvey P. Dale, Aug 25 2013 *)
  • PARI
    concat([0, 0], Vec(-x^2*(1+x)/(-1+x+x^2+x^3+x^4) + O(x^50))) \\ Michel Marcus, Dec 30 2015

Formula

G.f.: -x^2*(1+x)/(-1+x+x^2+x^3+x^4). [Simon Plouffe in his 1992 dissertation]
a(n) = A000078(n) + A000078(n+1) = a(n-1) + A000078(n+1) - A000078(n-1). - Henry Bottomley
a(n) = 2*a(n-1) - a(n-5) with n>4, a(0)=a(1)=0, a(2)=1, a(3)=2, a(4)=3. - Vincenzo Librandi, Dec 21 2010
G.f.: x^2 + x^3*G(0) where G(k) = 2 + x*(1 + x + x^2 + (1+x)*(1+x^2)*G(k+1)). - Sergei N. Gladkovskii, Jan 27 2013 [Edited by Michael Somos, Nov 12 2013]