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!)
A251701 a(n) = 3^n + n^2. 1
1, 4, 13, 36, 97, 268, 765, 2236, 6625, 19764, 59149, 177268, 531585, 1594492, 4783165, 14349132, 43046977, 129140452, 387420813, 1162261828, 3486784801, 10460353644, 31381060093, 94143179356, 282429537057, 847288610068, 2541865829005, 7625597485716 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
G.f.: (1-2*x+x^2-4*x^3)/((1-3*x)*(1-x)^3).
a(n) = 6*a(n-1)-12*a(n-2)+10*a(n-3)-3*a(n-4) for n>3.
a(n) = A000244(n) + A000290(n).
MAPLE
A251701:=n->3^n + n^2: seq(A251701(n), n=0..40); # Wesley Ivan Hurt, Jan 22 2017
MATHEMATICA
Table[3^n + n^2, {n, 0, 40}] (* or *) CoefficientList[Series[(1 - 2 x + x^2 - 4 x^3) / ((1 - 3 x) (1 - x)^3), {x, 0, 40}], x]
LinearRecurrence[{6, -12, 10, -3}, {1, 4, 13, 36}, 30] (* Harvey P. Dale, Aug 08 2017 *)
PROG
(Magma) [3^n+n^2: n in [0..30]] /* or */ I:=[1, 4, 13, 36]; [n le 4 select I[n] else 6*Self(n-1)-12*Self(n-2)+10*Self(n-3)-3*Self(n-4): n in [1..30]];
CROSSREFS
Sequence in context: A206603 A271176 A031506 * A291702 A348476 A065297
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Dec 07 2014
STATUS
approved

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 07:35 EDT 2024. Contains 371922 sequences. (Running on oeis4.)