OFFSET
0,3
COMMENTS
The three sequences that are merged share the same recurrence, case p=3 in A140414.
The first differences are 1, 1, 1, 3, 3, 3, 3, 6, 6, 9, 9, 18, 18, 18, 45, 36, 45, 99, 81, 108...
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,3,0,0,-3,0,0,3).
FORMULA
G.f.: x*(1+2*x+3*x^2+6*x^9+3*x^5+3*x^10+9*x^11+3*x^3+3*x^4)/(1-3*x^3+3*x^6-3*x^9).
MATHEMATICA
LinearRecurrence[{0, 0, 3, 0, 0, -3, 0, 0, 3}, {0, 1, 2, 3, 6, 9, 12, 15, 21, 27, 36, 45, 63}, 50] (* G. C. Greubel, Apr 15 2021 *)
PROG
(Magma) I:=[6, 9, 12, 15, 21, 27, 36, 45, 63]; [0, 1, 2, 3] cat [n le 9 select I[n] else 3*(Self(n-3) -Self(n-6) +Self(n-9)): n in [1..51]]; // G. C. Greubel, Apr 15 2021
(Sage) [( x*(1+2*x+3*x^2+6*x^9+3*x^5+3*x^10+9*x^11+3*x^3+3*x^4)/(1-3*x^3+3*x^6-3*x^9) ).series(x, n+1).list()[n] for n in (0..50)] # G. C. Greubel, Apr 15 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Jun 28 2008
EXTENSIONS
Edited and extended by R. J. Mathar, Mar 02 2010
STATUS
approved