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 A256666 #41 Sep 08 2022 08:46:11 %S A256666 0,5,14,29,51,82,123,176,242,323,420,535,669,824,1001,1202,1428,1681, %T A256666 1962,2273,2615,2990,3399,3844,4326,4847,5408,6011,6657,7348,8085, %U A256666 8870,9704,10589,11526,12517,13563,14666,15827,17048,18330,19675,21084,22559 %N A256666 a(n) = ( 2*n*(2*n^2 + 11*n + 26) - (-1)^n + 1 )/16. %C A256666 Consider a grid of small triangles of side 1 forming polygon with side n*(n+3): a(n) is the number of equilateral triangles of side length >=1 in this figure that are oriented with the sides of figure. %C A256666 This sequence gives the number of triangles of all sizes in a ((n^2+3*n))-iamond with a 3*(2*n-1)-gon n>=1. %C A256666 Equals (1/2)*Sum_{i=0..n-1} (n-i)*(n+1-i) + (-3 + (1/8)*Sum_{j=0..(2*n+3+(-1)^n)/4} (2*n+5-(-1)^n-4*j)*(2 n+5+(-1)^n-4*j) ) numbers of triangles in a direction and in the opposite direction. %C A256666 It is also a way (3 stages) to surround triangular n^2-iamonds by 3*n triangles side 1: in first stage we obtain A045947, in second stage A248851, in third stage this sequence. %H A256666 Colin Barker, <a href="/A256666/b256666.txt">Table of n, a(n) for n = 0..1000</a> %H A256666 Luce ETIENNE, <a href="/A256666/a256666.jpg">Illustration of initial terms</a>. %H A256666 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (3,-2,-2,3,-1). %F A256666 a(n) = 2*A248851(n) - A045947(n) + A004526(n+1). %F A256666 G.f.: x*(2*x^3-3*x^2-x+5) / ((x-1)^4*(x+1)). - _Colin Barker_, Apr 07 2015 %F A256666 a(n) = 3*a(n-1)-2*a(n-2)-2*a(n-3)+3*a(n-4)-a(n-5) for n>4. - _Colin Barker_, Apr 07 2015 %e A256666 From third comment: a(0)=0, a(1)=1+4, a(2)=4+10, a(3)=10+19, a(4)=20+31, a(5)=35+47, a(6)=56+67. %t A256666 Table[(4 n^3 + 22 n^2 + 52 n + 1 - (-1)^n)/16, {n, 0, 50}] (* _Vincenzo Librandi_, Apr 08 2015 *) %t A256666 LinearRecurrence[{3,-2,-2,3,-1},{0,5,14,29,51},50] (* _Harvey P. Dale_, Aug 18 2020 *) %o A256666 (PARI) concat(0, Vec(x*(2*x^3-3*x^2-x+5)/((x-1)^4*(x+1)) + O(x^100))) \\ _Colin Barker_, Apr 07 2015 %o A256666 (Magma) [(4*n^3+22*n^2+52*n+1-(-1)^n)/16: n in [0..50]]; // _Vincenzo Librandi_, Apr 08 2015 %Y A256666 Cf. A002623, A028552, A045947, A117143, A164004, A248851. %K A256666 nonn,easy %O A256666 0,2 %A A256666 _Luce ETIENNE_, Apr 07 2015