OFFSET
0,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,1,0,0,0,0,0,1,0,-1).
FORMULA
G.f.: (1 + x + x^2 + 2*x^3 + 2*x^5 + 2*x^6 + x^7 - x^8)/((1 - x)^2*(1 + x)^2* (1 + x^2)*(1 + x^4)). [Bruno Berselli, Jan 21 2016]
a(n) = a(n-2) + a(n-8) - a(n-10) for n>9. [Bruno Berselli, Jan 21 2016]
MATHEMATICA
RecurrenceTable[{a[0] == a[1] == 1, a[n] == Mod[a[n - 1], 3] + a[n - 2]}, a, {n, 90}]
LinearRecurrence[{0, 1, 0, 0, 0, 0, 0, 1, 0, -1}, {1, 1, 2, 3, 2, 5, 4, 6, 4, 7}, 90] (* Bruno Berselli, Jan 21 2016 *)
PROG
(PARI) a=vector(100); for(n=1, #a, if(n<3, a[n]=1, a[n]=a[n-1]%3+a[n-2])); a \\ Colin Barker, Jan 22 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
José María Grau Ribas, Jan 20 2016
EXTENSIONS
Edited by Bruno Berselli, Jan 21 2016
STATUS
approved