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.

A360927 Expansion of the g.f. x*(1 + 3*x + 4*x^2 + 4*x^3)/((1 - x)^2*(1 + x)).

Original entry on oeis.org

0, 1, 4, 9, 16, 21, 28, 33, 40, 45, 52, 57, 64, 69, 76, 81, 88, 93, 100, 105, 112, 117, 124, 129, 136, 141, 148, 153, 160, 165, 172, 177, 184, 189, 196, 201, 208, 213, 220, 225, 232, 237, 244, 249, 256, 261, 268, 273, 280, 285, 292, 297, 304, 309, 316, 321, 328
Offset: 0

Views

Author

Stefano Spezia, Feb 25 2023

Keywords

Comments

The sequence gives the number of "ON" cells in the cellular automaton on a quadrant of a square grid after the n-th stage, where the "ON" cells lie only on the perimeter and the two diagonals of the square.

Examples

			Illustrations for n = 1..8:
      o          o o          o o o
                 o o          o o o
                              o o o
  a(1) = 1    a(2) = 4      a(3) = 9
   o o o o    o o o o o    o o o o o o
   o o o o    o o   o o    o o     o o
   o o o o    o   o   o    o   o o   o
   o o o o    o o   o o    o   o o   o
              o o o o o    o o     o o
                           o o o o o o
  a(4) = 16   a(5) = 21     a(6) = 28
   o o o o o o o       o o o o o o o o
   o o       o o       o o         o o
   o   o   o   o       o   o     o   o
   o     o     o       o     o o     o
   o   o   o   o       o     o o     o
   o o       o o       o   o     o   o
   o o o o o o o       o o         o o
                       o o o o o o o o
     a(7) = 33            a(8) = 40
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,1,-1},{0,1,4,9,16},57]

Formula

a(n) = a(n-1) + a(n-2) - a(n-3) for n > 4.
a(0) = 0, a(1) = 1, a(n) = 6*n - 8 for n even, and a(n) = 6*n - 9 for n odd.
E.g.f.: 4*(x + 2) + (6*x - 8)*cosh(x) + (6*x - 9)*sinh(x).
a(2*n) = A017569(n-1) = 4*A016777(n-1).
a(2*n+1) = A017629(n-1).