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.

A255840 a(n) = (4*n^2 - 4*n + 1 - (-1)^n)/2.

This page as a plain text file.
%I A255840 #34 Sep 08 2022 08:46:11
%S A255840 0,1,4,13,24,41,60,85,112,145,180,221,264,313,364,421,480,545,612,685,
%T A255840 760,841,924,1013,1104,1201,1300,1405,1512,1625,1740,1861,1984,2113,
%U A255840 2244,2381,2520,2665,2812,2965,3120,3281,3444,3613,3784,3961,4140,4325,4512
%N A255840 a(n) = (4*n^2 - 4*n + 1 - (-1)^n)/2.
%C A255840 Take an n X n square grid and add unit squares along each side except for the corners --> do this repeatedly along each side with the same restriction until no squares can be added. a(n) is the total area of each figure. The perimeter, P, of each figure is given by P(n) = 4*A042963(n), n>0 (see example).
%C A255840 For n>0, partial sums of a(n) are in A056640.
%H A255840 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,-2,1).
%F A255840 G.f.: x*(1+2*x+5*x^2)/((1+x)*(1-x)^3).
%F A255840 a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
%F A255840 a(n) = A000290(n) + 4*A002620(n).
%F A255840 a(n) - a(n-1) = A047471(n). - _Wesley Ivan Hurt_, Apr 28 2017
%e A255840                                                                  _
%e A255840                                                                _|_|_
%e A255840                             _              _ _               _|_|_|_|_
%e A255840                           _|_|_          _|_|_|_           _|_|_|_|_|_|_
%e A255840               _ _       _|_|_|_|_      _|_|_|_|_|_       _|_|_|_|_|_|_|_|_
%e A255840     _        |_|_|     |_|_|_|_|_|    |_|_|_|_|_|_|     |_|_|_|_|_|_|_|_|_|
%e A255840    |_|       |_|_|       |_|_|_|      |_|_|_|_|_|_|       |_|_|_|_|_|_|_|
%e A255840                            |_|          |_|_|_|_|           |_|_|_|_|_|
%e A255840                                           |_|_|               |_|_|_|
%e A255840                                                                 |_|
%e A255840    n=1        n=2          n=3             n=4                  n=5
%p A255840 A255840:=n->(4*n^2 - 4*n + 1 - (-1)^n)/2: seq(A255840(n), n=0..100);
%t A255840 CoefficientList[Series[x (1 + 2 x + 5 x^2)/((1 + x) (1 - x)^3), {x, 0, 50}], x]
%o A255840 (Magma) [(4*n^2 - 4*n + 1 - (-1)^n)/2 : n in [0..100]];
%o A255840 (PARI) vector(100,n,(4*(n-1)^2 - 4*(n-1) + 1 + (-1)^n)/2) \\ _Derek Orr_, Mar 09 2015
%Y A255840 Cf. A000290 (squares), A002620 (quarter-squares), A042963.
%Y A255840 Cf. A056640, A085046, A255876.
%K A255840 nonn,easy
%O A255840 0,3
%A A255840 _Wesley Ivan Hurt_, Mar 07 2015