cp's OEIS Frontend

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.

A236333 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).

Original entry on oeis.org

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, 2, 121, 13, 2, 144, 14, 2, 169, 15, 2, 196, 16, 2, 225, 17, 2, 256, 18, 2, 289, 19, 2, 324, 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
Offset: 3

Views

Author

Vladimir Shevelev, Jan 22 2014

Keywords

Comments

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).

Examples

			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,
Thus, we have G_5(83)=G_5(82)+G_5(13), or 83*124 = 41*245 + 13*19 = 10292.
		

Crossrefs

Programs

  • 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
  • Mathematica
    a[n_]:=Which[Mod[n,3]==0,n^2/9,Mod[n,3]==1,(n+5)/3,True,2]; Map[a,Range[3,103]]
    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]
  • 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
    

Formula

If n==0 (mod 3), then a(n) = n^2/9;
if n==1 (mod 3), then a(n) = (n+5)/3;
if n==2 (mod 3), then a(n) = 2.
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