A001580 a(n) = 2^n + n^2.
1, 3, 8, 17, 32, 57, 100, 177, 320, 593, 1124, 2169, 4240, 8361, 16580, 32993, 65792, 131361, 262468, 524649, 1048976, 2097593, 4194788, 8389137, 16777792, 33555057, 67109540, 134218457, 268436240
Offset: 0
References
- G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
- P. R. Halmos, Problems for Mathematicians Young and Old. Math. Assoc. America, 1991, p. 179.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (5,-9,7,-2).
Programs
-
Magma
[2^n+n^2: n in [0..35]]; // Vincenzo Librandi, Jun 07 2011
-
Mathematica
f[n_]:=n^2+2^n; Table[f[n],{n,0,5!}] (* Vladimir Joseph Stephan Orlovsky, Dec 05 2009 *) LinearRecurrence[{5,-9,7,-2},{1,3,8,17},30] (* Harvey P. Dale, Jan 05 2020 *)
-
Maxima
A001580(n):=2^n+n^2$ makelist(A001580(n),n,0,20); /* Martin Ettl, Dec 18 2012 */
-
PARI
a(n)=2^n+n^2 \\ Charles R Greathouse IV, Apr 17 2012
-
Python
def A001580(n): return (1<
Chai Wah Wu, Apr 23 2023
Formula
G.f.: (2*x-2*x^2+3*x^3-1)/(1-x)^3/(-1+2*x). a(n) = 2*A000217(n+1)+A000079(n) -3*A000027(n+1)+1. - R. J. Mathar, Nov 16 2007