login
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.
4
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,3
REFERENCES
R. K. Guy, Letter to N. J. A. Sloane, Feb 05 1986.
FORMULA
G.f.: -x*(2*x^2-x+1) / (x^3-x^2+2*x-1). - Colin Barker, Jul 12 2015
MATHEMATICA
LinearRecurrence[{1, 1, 0, 1}, {1, 1, 3, 6}, 40] (* Vincenzo Librandi, Jul 12 2015 *)
PROG
(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
(PARI) Vec(-x*(2*x^2-x+1)/(x^3-x^2+2*x-1) + O(x^50)) \\ Colin Barker, Jul 12 2015
(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
CROSSREFS
Sequence in context: A189376 A069241 A092263 * A242525 A266617 A291608
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jul 11 2015
EXTENSIONS
a(28)-a(37) from Hiroaki Yamanouchi, Jul 12 2015
STATUS
approved