login
a(n) = 16*n^2 + 2*n + 1.
3

%I #39 Oct 18 2024 19:19:37

%S 1,19,69,151,265,411,589,799,1041,1315,1621,1959,2329,2731,3165,3631,

%T 4129,4659,5221,5815,6441,7099,7789,8511,9265,10051,10869,11719,12601,

%U 13515,14461,15439,16449,17491,18565,19671,20809,21979,23181,24415,25681,26979

%N a(n) = 16*n^2 + 2*n + 1.

%C Central terms of the triangle A033293.

%C Also sequence found by reading the line from 1, in the direction 1, 19, ... in the square spiral whose vertices are the generalized decagonal numbers A074377. - _Omar E. Pol_, Nov 02 2012

%H Vincenzo Librandi, <a href="/A204675/b204675.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 G.f.: (1+x)*(1+15*x)/(1-x)^3. - _Bruno Berselli_, Jan 18 2012

%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - _Wesley Ivan Hurt_, Jun 09 2023

%F E.g.f.: exp(x)*(1 + 2*x*(9 + 8*x)). - _Elmo R. Oliveira_, Oct 18 2024

%t CoefficientList[Series[(1+x)*(1+15*x)/(1-x)^3,{x,0,50}],x] (* or *) LinearRecurrence[{3, -3, 1}, {1, 19, 69}, 50] (* _Vincenzo Librandi_, Mar 19 2012 *)

%o (Haskell)

%o a204675 n = 2 * n * (8 * n + 1) + 1

%o (Magma) I:=[1, 19, 69]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3): n in [1..40]]; // _Vincenzo Librandi_, Mar 19 2012

%o (PARI) a(n)=16*n^2+2*n+1 \\ _Charles R Greathouse IV_, Jun 17 2017

%Y Cf. A017077, A033293, A074377, A136392.

%K nonn,easy

%O 0,2

%A _Reinhard Zumkeller_, Jan 18 2012