A093485 a(n) = (27*n^2 + 9*n + 2)/2.
1, 19, 64, 136, 235, 361, 514, 694, 901, 1135, 1396, 1684, 1999, 2341, 2710, 3106, 3529, 3979, 4456, 4960, 5491, 6049, 6634, 7246, 7885, 8551, 9244, 9964, 10711, 11485, 12286, 13114, 13969, 14851, 15760, 16696, 17659, 18649, 19666, 20710, 21781
Offset: 0
Examples
a(1) = 19 because (1+1)*(3*(1+1)-1)*(3*(1+1)-2)/2-1*(3*1-1)*(3*1-2)/2 = 2*(6-1)*(6-2)/2 - 1*(3-1)*(3-2)/2 = 20-1 = 19.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..10000
- Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
Programs
-
Haskell
a093485 n = (9 * n * (3 * n + 1) + 2) `div` 2 -- Reinhard Zumkeller, Jun 16 2013
-
Magma
[(27*n^2 + 9*n + 2)/2 : n in [0..50]]; // Vincenzo Librandi, Oct 08 2011
-
PARI
a(n)=(27*n^2+9*n+2)/2 \\ Charles R Greathouse IV, Jun 17 2017
Formula
a(n) = (n+1)*(3*(n+1)-1)*(3*(n+1)-2)/2-n*(3*n-1)*(3*n-2)/2.
G.f.: (1 + 16*x + 10*x^2)/(1 - x)^3. - Colin Barker, Mar 28 2012
Extensions
New definition from Ralf Stephan, Dec 01 2004
Name corrected and initial term added by Arkadiusz Wesolowski, Aug 15 2011
Comments