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.
%I A111746 #12 Sep 08 2022 08:45:21 %S A111746 0,5,17,42,82,143,227,340,484,665,885,1150,1462,1827,2247,2728,3272, %T A111746 3885,4569,5330,6170,7095,8107,9212,10412,11713,13117,14630,16254, %U A111746 17995,19855,21840,23952,26197,28577,31098,33762,36575,39539,42660,45940 %N A111746 Number of squares in the interior of the square with vertices (n,0), (0,n), (-n,0) and (0,-n) in a square (x,y)-grid. %F A111746 a(n) = n*(4*n^2 + 12*n + 11)/6 + 1/4 - (-1)^n/4 = floor(A000447(n+1)/2). %F A111746 a(n) = 4*A002623(n-1) + A000330(n), with A002623(-1)=0. - _Luce ETIENNE_, May 12 2015 %F A111746 G.f.: x*(5 + 2*x + x^2)/((1-x)^4*(1+x)). - _Vincenzo Librandi_, May 12 2015 %p A111746 seq(n*(4*n^2-1)/6 - 1/4 + 1/4*(-1)^n,n=1..50); %t A111746 Table[n (4 n^2 + 12 n + 11)/6 + 1/4 - (-1)^n/4, {n, 0, 60}] (* _Vincenzo Librandi_, May 12 2015 *) %o A111746 (Magma) [n*(4*n^2+12*n+11)/6+1/4-(-1)^n/4: n in [0..60]]; // _Vincenzo Librandi_, May 12 2015 %Y A111746 Cf. A000330, A000447, A002623. %K A111746 nonn,easy %O A111746 0,2 %A A111746 _Floor van Lamoen_, Nov 19 2005 %E A111746 Closed formula adapted to the offset by _Bruno Berselli_, May 12 2015