|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 4*a(n-1)-6*a(n-2)+5*a(n-3)-a(n-4). - R. J. Mathar, Apr 09 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
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|