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.

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

Original entry on oeis.org

1, 0, -1, 1, 2, -1, -1, 4, 3, -3, 2, 11, 3, -4, 15, 25, 2, 7, 55, 52, 11, 69, 162, 115, 91, 300, 439, 321, 482, 1039, 1199, 1124, 2003, 3277, 3522, 4251, 7283, 10076, 11295, 15785, 24642, 31447, 38375, 56212, 80731, 101269, 132962, 193155, 262731, 335500, 459079, 649041
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Crossrefs

Cf. A077951.

Programs

  • GAP
    a:=[1,0,-1];; for n in [4..60] do a[n]:=a[n-1]-a[n-2]+2*a[n-3]; od; a; # G. C. Greubel, Jun 29 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 60); Coefficients(R!( (1-x)/(1-x+x^2-2*x^3) )); // G. C. Greubel, Jun 29 2019
    
  • Mathematica
    LinearRecurrence[{1,-1,2}, {1,0,-1}, 60] (* or *) CoefficientList[Series[ (1-x)/(1-x+x^2-2*x^3), {x,0,60}], x] (* G. C. Greubel, Jun 29 2019 *)
  • PARI
    my(x='x+O('x^60)); Vec((1-x)/(1-x+x^2-2*x^3)) \\ G. C. Greubel, Jun 29 2019
    
  • Sage
    ((1-x)/(1-x+x^2-2*x^3)).series(x, 60).coefficients(x, sparse=False) # G. C. Greubel, Jun 29 2019
    

Formula

G.f.: (1-x)/(1-x+x^2-2*x^3).
a(n) = A077951(n) - A077951(n-1). - G. C. Greubel, Jun 29 2019

A331394 Number of ways of 4-coloring the Fibonacci square spiral tiling of n squares with colors introduced in order.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 6, 7, 11, 16, 19, 25, 38, 51, 63, 88, 127, 165, 214, 303, 419, 544, 731, 1025, 1382, 1819, 2487, 3432, 4583, 6125, 8406, 11447, 15291, 20656, 28259, 38185, 51238, 69571, 94703, 127608, 172047, 233845
Offset: 1

Views

Author

Michael C. Case, Jan 15 2020

Keywords

Comments

The Fibonacci square spiral tiling is the pattern formed by tiling the plane using squares with side-lengths of successive Fibonacci numbers (so the k-th square is of size F(k)), in a spiral pattern.
The Fibonacci square spiral tiling for 6 squares:
| | | |
| | | |
|___|_|_| |
| | |
| | |
| | |
| | |
|_______|_______________|
In a 4-coloring of the Fibonacci square spiral tiling, the square k cannot be the same color as squares k-4, k-3, or k-1. When k-1 is the same color as k-3, k can be colored in 2 different ways.
The first 3 squares must be colored ABC but for k>3 square k can be the same color as square k-2.

Examples

			There are 3 ways to 4-color a Fibonacci square spiral tiling of 5 squares:
   _____ ___   _____ ___   _____ ___
  |     | C | |     | C | |     | C |
  |  B  |_ _| |  B  |_ _| |  D  |_ _|
  |_____|A|B| |_____|A|B| |_____|A|B|
  |         | |         | |         |
  |         | |         | |         |
  |    C    | |    D    | |    C    |
  |         | |         | |         |
  |_________| |_________| |_________| so a(5)=3.
There are 7 ways to 4-color a Fibonacci square spiral tiling of 8 squares (ABCBCADA, ABCBCDAD, ABCBDADA, ABCBDADC, ABCDCABA, ABCDCDAB, ABCDCDBA), so a(7) = 8.
		

Crossrefs

Programs

  • Mathematica
    Rest@ CoefficientList[Series[x (1 + x) (1 - x + 2 x^2 - 2 x^3 + 2 x^4)/(1 - x + x^2 - 2 x^3), {x, 0, 42}], x] (* Michael De Vlieger, Jan 31 2020 *)

Formula

a(n) = a(n-1) - a(n-2) + 2*a(n-3) for n >= 7.
G.f.: x*(1 + x)*(1 - x + 2*x^2 - 2*x^3 + 2*x^4)/(1 - x + x^2 - 2*x^3).
a(n)/a(n-1) approaches the only real solution of x^3 - x^2 + x - 2 = 0, x = (1 - 2*(2/(47 + 3*sqrt(249)))^(1/3) + ((47 + 3*sqrt(249))/2)^(1/3))/3 = 1.35320996419932... .
Showing 1-2 of 2 results.