OFFSET
0,3
COMMENTS
a(n+15) = 3*a(n) for all n. - Dion Gijswijt (gijswijt(AT)science.uva.nl) Jul 29 2009 on SeqFan mailing list.
LINKS
A. Karttunen, Table of n, a(n) for n=0..224
Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3).
FORMULA
G.f. x*(1 +2*x +2*x^2 +x^3 -x^4 -2*x^5 -x^6 +x^7 +3*x^8 +4*x^9 +3*x^10 -3*x^12 -3*x^13) / (1 - 3*x^15 ). - R. J. Mathar, Jun 22 2011
MAPLE
a[0] := 0: a[1] := 1: a[2] := 2: for n from 3 to 80 do a[n] := a[n-1]-min(a[n-2], a[n-3]) end do: seq(a[n], n = 0 .. 80); # Emeric Deutsch, Aug 01 2009
MATHEMATICA
CoefficientList[Series[x*(1 +2*x +2*x^2 +x^3 -x^4 -2*x^5 -x^6 +x^7 +3*x^8 +4*x^9 +3*x^10 -3*x^12 -3*x^13)/(1 - 3*x^15 ), {x, 0, 50}], x] (* G. C. Greubel, Jul 26 2017 *)
nxt[{a_, b_, c_}]:={b, c, c-Min[a, b]}; NestList[nxt, {0, 1, 2}, 80][[All, 1]] (* or *) LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3}, {0, 1, 2, 2, 1, -1, -2, -1, 1, 3, 4, 3, 0, -3, -3}, 80] (* Harvey P. Dale, Apr 07 2018 *)
PROG
(PARI) x='x+O('x^50); concat([0], Vec(x*(1 +2*x +2*x^2 +x^3 -x^4 -2*x^5 -x^6 +x^7 +3*x^8 +4*x^9 +3*x^10 -3*x^12 -3*x^13)/(1 - 3*x^15 ))) \\ G. C. Greubel, Jul 26 2017
CROSSREFS
KEYWORD
sign
AUTHOR
Leroy Quet, Jul 29 2009
EXTENSIONS
Extended by Emeric Deutsch, Aug 01 2009
STATUS
approved