login
9 times pentagonal numbers: 9*n*(3*n-1)/2.
3

%I #29 Sep 08 2022 08:45:39

%S 0,9,45,108,198,315,459,630,828,1053,1305,1584,1890,2223,2583,2970,

%T 3384,3825,4293,4788,5310,5859,6435,7038,7668,8325,9009,9720,10458,

%U 11223,12015,12834,13680,14553,15453,16380,17334,18315,19323

%N 9 times pentagonal numbers: 9*n*(3*n-1)/2.

%H Ivan Panchenko, <a href="/A152996/b152996.txt">Table of n, a(n) for n = 0..1000</a>

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

%F a(n) = A000326(n)*9 = A062741(n)*3.

%F G.f.: 9*x*(1+2*x)/(1-x)^3. - _Colin Barker_, Feb 21 2012

%F a(0)=0, a(1)=9, a(2)=45, a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - _Harvey P. Dale_, Jan 14 2016

%F E.g.f.: 9*x*(2 + 3*x)*exp(x)/2. - _G. C. Greubel_, Sep 01 2019

%p seq(9*n*(3*n-1)/2, n=0..40); # _G. C. Greubel_, Sep 01 2019

%t Table[9n(3n-1)/2, {n,0,40}] (* or *) LinearRecurrence[{3,-3,1}, {0,9,45}, 40] (* _Harvey P. Dale_, Jan 14 2016 *)

%o (Magma) [9*n*(3*n-1)/2: n in [0..50]];

%o (PARI) a(n)=9*n*(3*n-1)/2 \\ _Charles R Greathouse IV_, Jun 17 2017

%o (Sage) [9*n*(3*n-1)/2 for n in (0..40)] # _G. C. Greubel_, Sep 01 2019

%o (GAP) List([0..40], n-> 9*n*(3*n-1)/2); # _G. C. Greubel_, Sep 01 2019

%Y Cf. A000326 (pentagonal numbers), A062741 (pentagonal numbers multiplied by 3).

%K easy,nonn

%O 0,2

%A _Omar E. Pol_, Dec 22 2008