login
The (n-2)-th (n>=3) triple of terms gives coefficients of double trinomial P_n(x) = ((n-2)^2*x^2 + n*x + 2)/2 (see comment).
1

%I #25 Feb 09 2024 17:48:53

%S 1,3,2,4,4,2,9,5,2,16,6,2,25,7,2,36,8,2,49,9,2,64,10,2,81,11,2,100,12,

%T 2,121,13,2,144,14,2,169,15,2,196,16,2,225,17,2,256,18,2,289,19,2,324,

%U 20,2,361,21,2,400,22,2,441,23,2,484,24,2,529,25,2,576,26,2,625,27,2,676,28,2,729,29,2

%N The (n-2)-th (n>=3) triple of terms gives coefficients of double trinomial P_n(x) = ((n-2)^2*x^2 + n*x + 2)/2 (see comment).

%C Let {G_n(k)}_(k>=0) be sequence of n-gonal numbers. Then G_n(P_n(k)) = G_n(P_n(k)-1) + G_n((n-2)*k+1).

%H Vincenzo Librandi, <a href="/A236333/b236333.txt">Table of n, a(n) for n = 3..1000</a>

%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,3,0,0,-3,0,0,1).

%F If n==0 (mod 3), then a(n) = n^2/9;

%F if n==1 (mod 3), then a(n) = (n+5)/3;

%F if n==2 (mod 3), then a(n) = 2.

%F G.f.: -x^3*(2*x^8+2*x^7-4*x^5-5*x^4+x^3+2*x^2+3*x+1) / ((x-1)^3*(x^2+x+1)^3). - _Colin Barker_, Jan 23 2014

%e Let n=5, k=4. Then G_5(k)=k*(3*k-1)/2 (Cf. A000326) and the double trinomial 2*P_5(x)= 9*x^2+5*x+2, P_5(4)=(9*4^2+5*4+2)/2=83,

%e Thus, we have G_5(83)=G_5(82)+G_5(13), or 83*124 = 41*245 + 13*19 = 10292.

%t a[n_]:=Which[Mod[n,3]==0,n^2/9,Mod[n,3]==1,(n+5)/3,True,2]; Map[a,Range[3,103]]

%t CoefficientList[Series[(-1-3 x-2 x^2-x^3+5 x^4+4 x^5-2 x^7-2 x^8)/((-1+x)^3 (1+x+x^2)^3),{x,0,100}],x]

%o (PARI) Vec(-x^3*(2*x^8+2*x^7-4*x^5-5*x^4+x^3+2*x^2+3*x+1)/((x-1)^3*(x^2+x+1)^3) + O(x^100)) \\ _Colin Barker_, Jan 23 2014

%o (Magma) I:=[1,3,2,4,4,2,9,5,2]; [n le 9 select I[n] else 3*Self(n-3)-3*Self(n-6)+Self(n-9): n in [1..90]]; // _Vincenzo Librandi_, Feb 02 2014

%Y Cf. A000217, A000290, A000326, A000384, A000566, A000567, A001106, A001107, A051682, A051624, A051865-A051876.

%K nonn,easy

%O 3,2

%A _Vladimir Shevelev_, Jan 22 2014