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 A339623 #20 Sep 08 2022 08:46:26 %S A339623 1,5,21,52,97,156,229,316,417,532,661,804,961,1132,1317,1516,1729, %T A339623 1956,2197,2452,2721,3004,3301,3612,3937,4276,4629,4996,5377,5772, %U A339623 6181,6604,7041,7492,7957,8436,8929,9436,9957,10492,11041,11604,12181,12772,13377,13996,14629,15276,15937,16612,17301 %N A339623 Consider a square drawn on the perimeter of a square lattice with side length n. a(n) is the number of regions inside the square after drawing unit circles centered at each interior lattice point of the square. %H A339623 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1). %H A339623 Peter Kagey, <a href="/A339623/a339623_1.png">Example of a(4) = 52</a>. %F A339623 a(n) = 7*n^2 - 18*n + 12 for n >= 3, with a(1) = 1, a(2) = 5. %F A339623 a(n) = A186862(n)/8+1 for n >= 3. - _Hugo Pfoertner_, Dec 10 2020 %F A339623 From _Stefano Spezia_, Dec 10 2020: (Start) %F A339623 G.f.: x*(1 + 2*x + 9*x^2 + 3*x^3 - x^4)/(1 - x)^3. %F A339623 a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n >= 3. (End) %t A339623 Join[{1, 5}, LinearRecurrence[{3, -3, 1}, {21, 52, 97}, 49]] (* _Amiram Eldar_, Dec 10 2020 *) %o A339623 (Magma) [1,5] cat [7*n^2-18*n+12 : n in [3..80]]; %Y A339623 Cf. A186862, A339609 (triangular version). %K A339623 nonn,easy %O A339623 1,2 %A A339623 _Wesley Ivan Hurt_, Dec 10 2020