A248098 a(n) = 1 + a(n-1) + a(n-2) + a(n-3) if n>=4; a(1) = a(2) = a(3) = 1.
1, 1, 1, 4, 7, 13, 25, 46, 85, 157, 289, 532, 979, 1801, 3313, 6094, 11209, 20617, 37921, 69748, 128287, 235957, 433993, 798238, 1468189, 2700421, 4966849, 9135460, 16802731, 30905041, 56843233, 104551006, 192299281, 353693521
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
- D. K. Chang, On Fibonacci k-ary trees, The Fibonacci Quarterly, Volume 24, Number 3, August 1986, 258-262.
- Index entries for linear recurrences with constant coefficients, signature (2,0,0,-1).
Programs
-
Haskell
a248098 n = a248098_list !! (n-1) a248098_list = 1 : 1 : 1 : map (+ 1) (zipWith3 (((+) .) . (+)) a248098_list (tail a248098_list) (drop 2 a248098_list)) -- Reinhard Zumkeller, Dec 29 2014
-
Maple
a[1]:=1: a[2]:=1: a[3]:=1: for n from 4 to 40 do a[n] := 1+a[n-1]+a[n-2]+a[n-3] end do: seq(a[n], n=1..40); g:=z*(1-z^2+2*z^3-z)/((1-z)*(1-z-z^2-z^3)): gser:=series(g,z=0,45): seq(coeff(gser,z,n), n=1..40);
Formula
G.f. = z*(1-z-z^2+2*z^3)/((1-z)*(1-z-z^2-z^3)).
Comments