login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A024025 a(n) = 3^n-n^2. 7
1, 2, 5, 18, 65, 218, 693, 2138, 6497, 19602, 58949, 177026, 531297, 1594154, 4782773, 14348682, 43046465, 129139874, 387420165, 1162261106, 3486784001, 10460352762, 31381059125, 94143178298, 282429535905, 847288608818 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 0..1000

Index entries for linear recurrences with constant coefficients, signature (6,-12,10,-3).

FORMULA

G.f.: (1-4*x+5*x^2+2*x^3)/((1-3*x)*(1-x)^3). - Vincenzo Librandi, Oct 05 2014

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

a(n) = A000244(n) - A000290(n). - Michel Marcus, Oct 05 2014

MAPLE

A024025:=n->3^n-n^2: seq(A024025(n), n=0..50); # Wesley Ivan Hurt, Jan 11 2017

MATHEMATICA

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 *)

PROG

(MAGMA) [3^n-n^2: n in [0..30]]; // Vincenzo Librandi, Jul 02 2011

CROSSREFS

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).

Cf. A000244, A000290.

Sequence in context: A266833 A148429 A093635 * A084518 A150014 A150015

Adjacent sequences:  A024022 A024023 A024024 * A024026 A024027 A024028

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 20 20:24 EDT 2019. Contains 328273 sequences. (Running on oeis4.)