OFFSET
1,5
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..1852
FORMULA
a(3*k) = 3*a(3*k-1) - a(3*k-2) - 1,
a(3*k+1) = 3*a(3*k) - a(3*k-1) - 1,
a(3*k+2) = 6*a(3*k+1) - a(3*k) - 1.
G.f.: -x*(4*x^8 + 10*x^7 + 25*x^6 - 33*x^5 - 39*x^4 - 42*x^3 + x^2 + x + 1) / ((x - 1)*(x^2 + x + 1)*(x^6 - 42*x^3 + 1)). - Alois P. Heinz, Mar 20 2017
MATHEMATICA
a[n_]:= If[n<5, 1, (Sum[a[n-j] , {j, 3}] + a[n - 1] a[n - 3])/a[n - 4]]; Table[a[n], {n, 29}] (* Indranil Ghosh, Mar 18 2017 *)
PROG
(PARI) a(n) = if(n<5, 1, (sum(j=1, 3, a(n - j)) + a(n - 1)*a(n - 3))/a(n - 4));
for(n=1, 29, print1(a(n), ", ")) \\ Indranil Ghosh, Mar 18 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Mar 18 2017
STATUS
approved