login
A137166
Sequence equals its 4th differences shifted by one index.
1
1, 3, 7, 15, 32, 70, 156, 349, 778, 1728, 3833, 8505, 18884, 41943, 93160, 206897, 459459, 1020311, 2265815, 5031792, 11174374, 24815508, 55108933, 122382762, 271780616, 603555049, 1340341377, 2976555532, 6610168495, 14679492624
OFFSET
0,2
COMMENTS
Binomial transform yields A079398 without the initial (0,1,1,1). - R. J. Mathar, Apr 09 2008
FORMULA
a(n) = 4*a(n-1)-6*a(n-2)+5*a(n-3)-a(n-4). - R. J. Mathar, Apr 09 2008
G.f.: (x^2 - x + 1) / (x^4 - 5*x^3 + 6*x^2 - 4*x + 1). - Alexander R. Povolotsky, Apr 08 2008
MATHEMATICA
s = ""; a = 0; b = 1; c = 1; d = 1; For[i = 0, i < 23, a = a + b; s = s <> ToString[a] <> ", "; b = b + c; c = c + d; d = d + a; i++ ]; Print[s]
LinearRecurrence[{4, -6, 5, -1}, {1, 3, 7, 15}, 40] (* Vincenzo Librandi, Jun 15 2013 *)
PROG
(Magma) [n le 4 select 2^n-1 else 4*Self(n-1)-6*Self(n-2)+5*Self(n-3)-Self(n-4): n in [1..30]]; // Vincenzo Librandi, Jun 15 2013
(PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; -1, 5, -6, 4]^n*[1; 3; 7; 15])[1, 1] \\ Charles R Greathouse IV, Oct 03 2016
CROSSREFS
Cf. A079398.
Sequence in context: A099444 A374678 A132402 * A101890 A307573 A134195
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Edited by R. J. Mathar, Apr 09 2008
Edited by Bruno Berselli, Apr 07 2011
STATUS
approved