%I #40 Dec 27 2024 21:03:37
%S 0,2,18,48,92,150,222,308,408,522,650,792,948,1118,1302,1500,1712,
%T 1938,2178,2432,2700,2982,3278,3588,3912,4250,4602,4968,5348,5742,
%U 6150,6572,7008,7458,7922,8400,8892,9398,9918,10452,11000
%N Twice nonagonal numbers (or twice 9-gonal numbers): a(n) = n*(7*n-5).
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).
%F a(n) = 2*A001106(n) = 7*n^2 - 5*n = n*(7*n-5).
%F a(n) = 14*n + a(n-1) - 12, with a(0)=0. - _Vincenzo Librandi_, Aug 03 2010
%F G.f.: 2*x*(1 + 6*x)/(1 - x)^3. - _Philippe Deléham_, Apr 03 2013
%F From _Elmo R. Oliveira_, Dec 27 2024: (Start)
%F E.g.f.: exp(x)*x*(2 + 7*x).
%F a(n) = n + A051868(n).
%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)
%t s=0;lst={s};Do[s+=n;AppendTo[lst,s],{n,2,6!,14}];lst (* _Vladimir Joseph Stephan Orlovsky_, Apr 02 2009 *)
%t 2*PolygonalNumber[9,Range[0,40]] (* or *) LinearRecurrence[{3,-3,1},{0,2,18},50] (* _Harvey P. Dale_, Feb 08 2024 *)
%o (PARI) a(n)=n*(7*n-5) \\ _Charles R Greathouse IV_, Jun 17 2017
%Y Cf. A001106, A051868.
%Y Cf. numbers of the form n*(n*k - k + 4)/2 listed in A226488 (this sequence is the case k=14). - _Bruno Berselli_, Jun 10 2013
%K nonn,easy
%O 0,2
%A _Omar E. Pol_, May 15 2008