OFFSET
1,4
COMMENTS
This sequence is eventually quasilinear with period 6. Each component sequence has slope 0 or 1/2.
LINKS
Nathan Fox, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (0, 0, 1, 0, 0, 1, 0, 0, -1).
FORMULA
If the index is at least 41:
a(6n) = 1
a(6n+1) = 3n-1
a(6n+2) = 3n+1
a(6n+3) = 1
a(6n+4) = 3n+1
a(6n+5) = 3n+2.
G.f.: (-x^48-x^46-x^45-x^43+x^42+3*x^41+x^40-9*x^39-x^38+3*x^37+x^36-4*x^35+x^34+12*x^33+x^32-2*x^31+x^30+x^29-x^28+x^26-3*x^25-2*x^24-x^23+2*x^22-x^20+2*x^19+3*x^18-2*x^16-x^15+2*x^13-3*x^12+x^11-x^8+x^4+x^3+x^2+x+1) / ((1+x)*(1-x+x^2)*(-1+x)^2*(1+x+x^2)^2).
a(n) = a(n-3) + a(n-6) - a(n-9) for n > 49.
MAPLE
CROSSREFS
KEYWORD
nonn
AUTHOR
Nathan Fox, Mar 19 2017
STATUS
approved