login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A024025 a(n) = 3^n - n^2. 7

%I #26 Aug 20 2023 10:50:13

%S 1,2,5,18,65,218,693,2138,6497,19602,58949,177026,531297,1594154,

%T 4782773,14348682,43046465,129139874,387420165,1162261106,3486784001,

%U 10460352762,31381059125,94143178298,282429535905,847288608818

%N a(n) = 3^n - n^2.

%H Vincenzo Librandi, <a href="/A024025/b024025.txt">Table of n, a(n) for n = 0..1000</a>

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

%F G.f.: (1-4*x+5*x^2+2*x^3)/((1-3*x)*(1-x)^3). - _Vincenzo Librandi_, Oct 05 2014

%F a(n) = 6*a(n-1) -12*a(n-2) +10*a(n-3) -3*a(n-4) for n>3. - _Vincenzo Librandi_, Oct 05 2014

%F a(n) = A000244(n) - A000290(n). - _Michel Marcus_, Oct 05 2014

%F E.g.f.: exp(3*x) - x*(1+x)*exp(x). - _G. C. Greubel_, Aug 18 2023

%p A024025:=n->3^n-n^2: seq(A024025(n), n=0..50); # _Wesley Ivan Hurt_, Jan 11 2017

%t Table[3^n - n^2, {n, 0, 25}] (* or *) CoefficientList[Series[(1 - 4 x + 5 x^2 + 2 x^3)/((1 - 3 x) (1 - x)^3), {x, 0, 30}], x] (* _Vincenzo Librandi_, Oct 05 2014 *)

%o (Magma) [3^n-n^2: n in [0..30]]; // _Vincenzo Librandi_, Jul 02 2011

%o (SageMath) [3^n-n^2 for n in range(31)] # _G. C. Greubel_, Aug 18 2023

%Y Cf. sequences of the form k^n-n^2: A024012 (k=2), this sequence (k=3), A024038 (k=4), A024051 (k=5), A024064 (k=6), A024077 (k=7), A024090 (k=8), A024103 (k=9), A024116 (k=10), A024129 (k=11), A024142 (k=12).

%Y Cf. A000244, A000290.

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)