OFFSET
1,2
COMMENTS
Three arithmetic progressions interlaced: a(1..3) = 1..3 and d = a(n+3)-a(n) = 4,5,3.
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,2,0,0,-1).
FORMULA
a(n) = n+floor(n/3)*(n mod 3), n = 1, 2, ...
a(n) = 2*a(n-3)-a(n-6). - Colin Barker, May 11 2015
G.f.: x*(3*x^4+3*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^2+x+1)^2). - Colin Barker, May 11 2015
E.g.f.: (-5+12*x)*exp(x)/9 + (3+2*x)*sqrt(3)*exp(-x/2)*sin(sqrt(3)*x/2)/9 + 5*exp(-x/2)*cos(sqrt(3)*x/2)/9. - Robert Israel, May 11 2015
MAPLE
seq(op([1+4*j, 2+5*j, 3+3*j]), j=0..100); # Robert Israel, May 11 2015
MATHEMATICA
Table[n+Floor[n/3]*Mod[n, 3], {n, 78}]
LinearRecurrence[{0, 0, 2, 0, 0, -1}, {1, 2, 3, 5, 7, 6}, 80] (* Harvey P. Dale, Aug 06 2021 *)
PROG
(PARI) Vec(x*(3*x^4+3*x^3+3*x^2+2*x+1) / ((x-1)^2*(x^2+x+1)^2) + O(x^100)) \\ Colin Barker, May 11 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, Jan 18 2006
STATUS
approved