OFFSET
1,5
COMMENTS
See A187180 for details.
LINKS
Ray Chandler, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1).
FORMULA
From Colin Barker, Jan 31 2020: (Start)
G.f.: x*(1 + x^4 + x^6 - x^7 + x^9 + x^12 + x^13 - x^14 + x^15 - 2*x^16 + x^17 - x^18 + x^19) / ((1 - x)^2*(1 + x)*(1 + x^2)*(1 + x^4)*(1 + x^8)).
a(n) = a(n-1) + a(n-16) - a(n-17) for n>20.
(End)
EXAMPLE
The sequence is quasi-periodic with period 16, increasing by 4 after each block:
1 1 1 1
2 2 3 2 2 3 3 3 4 5 4 5 4 5 4 5
6 6 7 6 6 7 7 7 8 9 8 9 8 9 8 9
10 10 11 10 10 11 11 11 12 13 12 13 12 13 12 13
14 14 15 14 14 15 15 15 16 17 16 17 16 17 16 17
...
MATHEMATICA
Join[{1, 1, 1}, LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1}, {1, 2, 2, 3, 2, 2, 3, 3, 3, 4, 5, 4, 5, 4, 5, 4, 5}, 97]] (* Ray Chandler, Aug 26 2015 *)
PROG
(PARI) Vec(x*(1 + x^4 + x^6 - x^7 + x^9 + x^12 + x^13 - x^14 + x^15 - 2*x^16 + x^17 - x^18 + x^19) / ((1 - x)^2*(1 + x)*(1 + x^2)*(1 + x^4)*(1 + x^8)) + O(x^80)) \\ Colin Barker, Jan 31 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Mar 06 2011
STATUS
approved