login
a(n) = 9*n^2 - 13*n + 5.
6

%I #22 Mar 08 2024 08:59:09

%S 1,15,47,97,165,251,355,477,617,775,951,1145,1357,1587,1835,2101,2385,

%T 2687,3007,3345,3701,4075,4467,4877,5305,5751,6215,6697,7197,7715,

%U 8251,8805,9377,9967,10575,11201,11845,12507,13187,13885,14601,15335,16087

%N a(n) = 9*n^2 - 13*n + 5.

%C Central terms of triangle A214661.

%H G. C. Greubel, <a href="/A214675/b214675.txt">Table of n, a(n) for n = 1..1000</a>

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

%F G.f.: x*(1+12*x+5*x^2)/(1-x)^3. - _Bruno Berselli_, Dec 10 2012

%F a(n) = n*A000567(n)-(n-1)*A000567(n-1). - _Bruno Berselli_, Dec 10 2012

%F E.g.f.: -5 + (5 - 4*x + 9*x^2)*exp(x). - _G. C. Greubel_, Mar 08 2024

%t Table[9n^2-13n+5,{n,50}] (* or *) LinearRecurrence[{3,-3,1},{1,15,47}, 50] (* _Harvey P. Dale_, Nov 09 2019 *)

%o (Haskell)

%o a214675 n = (9 * n - 13) * n + 5

%o (PARI) a(n)=9*n^2-13*n+5 \\ _Charles R Greathouse IV_, Oct 07 2015

%o (Magma) [(3*n-2)^2-(n-1): n in [1..50]]; // _G. C. Greubel_, Mar 08 2024

%o (SageMath) [(3*n-2)^2-(n-1) for n in range(1,51)] # _G. C. Greubel_, Mar 08 2024

%Y Cf. A000567, A001106, A214661.

%Y Cf. A220083 for a list of numbers of the form n*P(s,n)-(n-1)*P(s,n-1), where P(s,n) is the n-th polygonal number with s sides.

%K nonn,easy

%O 1,2

%A _Reinhard Zumkeller_, Jul 25 2012