OFFSET
1,2
COMMENTS
0 3 6 9 12 15 18 21 24 ... a(n)= 3n
1 4 7 10 13 16 19 22 25 ... a(n)= 3n+1
2 5 8 11 14 17 20 23 26 ... a(n)= 3n+2
REFERENCES
M. Cerasoli, F. Eugeni and M. Protasi, Elementi di Matematica Discreta, Bologna 1988.
Emanuele Munarini and Norma Zagaglia Salvi, Matematica Discreta, UTET, CittaStudiEdizioni, Milano 1997.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
FORMULA
Starting at the term a(3), a(n+3k) = a(n) + 3k, with k>=1.
From Chai Wah Wu, Jul 10 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n > 7.
G.f.: x^2*(2*x^5 - 5*x^3 + 5*x^2 - 2*x + 3)/(x^4 - x^3 - x + 1). (End)
MATHEMATICA
Rest[CoefficientList[Series[x^2*(2*x^5 - 5*x^3 + 5*x^2 - 2*x + 3)/(x^4 - x^3 - x + 1), {x, 0, 50}], x]] (* or *) Join[{0, 3, 1, 6, 4, 2, 9}, LinearRecurrence[{1, 0, 1, -1}, {7, 5, 12, 10}, 50]] (* G. C. Greubel, Sep 20 2017 *)
PROG
(PARI) x='x+O('x^50); Vec(x^2*(2*x^5 - 5*x^3 + 5*x^2 - 2*x + 3)/(x^4 - x^3 - x + 1)) \\ G. C. Greubel, Sep 20 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Giovanni Teofilatto, Mar 17 2006
STATUS
approved