%I #38 Sep 08 2022 08:46:14
%S 0,1,3,5,10,13,22,26,41,46,68,74,105,112,153,161,214,223,289,299,380,
%T 391,488,500,615,628,762,776,931,946,1123,1139,1340,1357,1583,1601,
%U 1854,1873,2154,2174,2485,2506,2848,2870,3245,3268,3677,3701,4146,4171,4653
%N Number of triangles in a certain geometric structure: see "Illustration of initial terms" link for precise definition.
%C In words: This sequence gives the number of triangles of all sizes in a ((2*n^2+8*n-1+(-1)^n)/8-polyiamond with a (7*n-2-(n-2)*(-1)^n)/4-gon: we have (2*n^3+9*n^2+31*n+21+3*(n^2-5*n-7)*(-1)^n)/96 triangles in a direction and (2*n^3+27*n^2+109*n-66+3*(n^2+9*n+18)*(-1)^n+12*(-1)^((2*n-1+(-1)^n)/4))/192 triangles in the other direction. (But the Illustration link is far more informative. - _N. J. A. Sloane_, Jan 23 2016)
%C At stage n, we count ((2*n^2 + 6*n + 3 - 2*n + 3*(-1)^n)/16 triangles of size 1 in one direction and (2*n^2 + 10*n - 5 + (2*n+5)*(-1)^n)/16 triangles of size 1 in the opposite direction. The total number of triangles of size 1 in both directions is A024206(n).
%C a(n) = A045947(n) duplicated + A024206(n). Note that A045947(n) duplicated = (2*n^3-n^2-7*n+(3*n^2-n-4)*(-1)^n+4*(-1)^((2*n-1+(-1)^n)/4))/64.
%C We observe that a(4)=10 strengthens the Pythagorean relation between 4 and 10 (Tetraktys): cf. triangular numbers, A000217; and that it is from n = 4 we can see and count hexagonal and dodecagonal forms, for example, in a reticular system (incomplete with hexagonal holes) by opposition to the compact shape obtained from A002717.
%C We can obtain this reticular system from A248851.
%H G. C. Greubel, <a href="/A265282/b265282.txt">Table of n, a(n) for n = 0..10000</a>
%H Luce ETIENNE, <a href="/A265282/a265282.pdf">Illustration of initial terms</a>
%H Luce ETIENNE, <a href="/A265282/a265282_1.pdf">A265282 from A248851</a>
%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,0,0,-2,2,1,-1).
%F a(n) = (2*n^3 + 15*n^2 + 57*n - 8 + (3*n^2 - n + 4)*(-1)^n + 4*(-1)^((2*n - 1 + (-1)^n)/4))/64.
%F G.f.: x*(1+2*x+x^3-x^4-x^5+x^7) / ((1-x)^4*(1+x)^3*(1+x^2)). - _Colin Barker_, Dec 07 2015
%t Table[(2*n^3 + 15*n^2 + 57*n - 8 + (3*n^2 - n + 4)*(-1)^n +
%t 4*(-1)^((2*n - 1 + (-1)^n)/4))/64, {n, 0, 100}] (* _G. C. Greubel_, Dec 20 2015 *)
%t LinearRecurrence[{1,2,-2,0,0,-2,2,1,-1},{0,1,3,5,10,13,22,26,41},60] (* _Harvey P. Dale_, Aug 07 2019 *)
%o (PARI) vector(100, n, n--; (2*n^3+15*n^2+57*n-8+(3*n^2-n+4)*(-1)^n+4*(-1)^((2*n-1+(-1)^n)/4))/64) \\ _Altug Alkan_, Dec 06 2015
%o (Magma) [(2*n^3 + 15*n^2 + 57*n - 8 + (3*n^2 - n + 4)*(-1)^n + 4*(-1)^((2*n - 1 + (-1)^n) div 4)) / 64: n in [0..50]]; // _Vincenzo Librandi_, Dec 07 2015
%o (PARI) concat(0, Vec(x*(1+2*x+x^3-x^4-x^5+x^7)/((1-x)^4*(1+x)^3*(1+x^2)) + O(x^100))) \\ _Colin Barker_, Dec 07 2015
%Y Cf. A000217, A000292, A001477, A001859, A002620, A002717, A004006, A004526, A045947, A132337.
%Y Cf. A248851.
%K nonn,easy
%O 0,3
%A _Luce ETIENNE_, Dec 06 2015
%E a(26) corrected by _Altug Alkan_, Dec 06 2015
|