A259968 a(n) = a(n-1) + a(n-2) + a(n-4), with a(1)=1, a(2)=1, a(3)=3, a(4)=6.
1, 1, 3, 6, 10, 17, 30, 53, 93, 163, 286, 502, 881, 1546, 2713, 4761, 8355, 14662, 25730, 45153, 79238, 139053, 244021, 428227, 751486, 1318766, 2314273, 4061266, 7127025, 12507057, 21948355, 38516678, 67592058, 118615793, 208156206, 365288677, 641036941
Offset: 1
References
- R. K. Guy, Letter to N. J. A. Sloane, Feb 05 1986.
Links
- Colin Barker, Table of n, a(n) for n = 1..1000
- R. K. Guy, Letter to N. J. A. Sloane, Feb 1986
- Index entries for linear recurrences with constant coefficients, signature (1,1,0,1).
Programs
-
Haskell
a259968 n = a259968_list !! n a259968_list = 1 : 1 : 3 : 6 : zipWith3 (((+) .) . (+)) a259968_list (drop 2 a259968_list) (drop 3 a259968_list) -- Reinhard Zumkeller, Jul 12 2015
-
Magma
I:=[1,1,3,6]; [n le 4 select I[n] else Self(n-1)+Self(n-2)+Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jul 12 2015
-
Mathematica
LinearRecurrence[{1, 1, 0, 1}, {1, 1, 3, 6}, 40] (* Vincenzo Librandi, Jul 12 2015 *) nxt[{a_,b_,c_,d_}]:={b,c,d,a+c+d}; NestList[nxt,{1,1,3,6},40][[;;,1]] (* Harvey P. Dale, Jan 28 2025 *)
-
PARI
Vec(-x*(2*x^2-x+1)/(x^3-x^2+2*x-1) + O(x^50)) \\ Colin Barker, Jul 12 2015
Formula
G.f.: -x*(2*x^2-x+1) / (x^3-x^2+2*x-1). - Colin Barker, Jul 12 2015
Extensions
a(28)-a(37) from Hiroaki Yamanouchi, Jul 12 2015