A172447 a(n) = (-1 + 5*2^(2*n + 1) - 3*n)/9.
1, 4, 17, 70, 283, 1136, 4549, 18202, 72815, 291268, 1165081, 4660334, 18641347, 74565400, 298261613, 1193046466, 4772185879, 19088743532, 76354974145, 305419896598, 1221679586411, 4886718345664, 19546873382677, 78187493530730, 312749974122943, 1250999896491796
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (6,-9,4).
Crossrefs
Cf. A072197 (first differences).
Programs
-
Magma
[(-1+5*2^(2*n+1)-3*n)/9: n in [0..30]]; // Vincenzo Librandi, Aug 05 2011
-
Mathematica
LinearRecurrence[{6, -9, 4}, {1, 4, 17}, 30] (* Harvey P. Dale, Mar 25 2016 *) ((-1 + 5 2^(2# + 1) - 3#)/9 &) /@ Range[0, 29] (* Alonso del Arte, Apr 25 2020 *)
-
PARI
a(n)=(10*4^n-3*n)\9 \\ Charles R Greathouse IV, Jul 21 2015
-
Scala
val powerOf2: LazyList[BigInt] = LazyList.iterate(1: BigInt)(_ * 2) (0 to 29).map(n => (-1 + 5 * powerOf2(2 * n + 1) - 3 * n)/9) // Alonso del Arte, Apr 25 2020
Formula
a(n) = 6*a(n - 1) - 9*a(n - 2) + 4*a(n - 3).
a(n + 1) - 4*a(n) = n.
a(n) = A172416(2n + 1).
G.f.: (1 - 2*x + 2*x^2)/((1 - 4*x) * (x - 1)^2). - R. J. Mathar, Feb 11 2010
E.g.f.: (10*exp(4*x) - (1 + 3*x)*exp(x))/9. - G. C. Greubel, Nov 02 2018
Extensions
Definition replaced by closed formula by R. J. Mathar, Feb 11 2010
Comments