A137241 Number triples (k,3-k,2-2k), concatenated for k=0, 1, 2, 3,...
0, 3, 2, 1, 2, 0, 2, 1, -2, 3, 0, -4, 4, -1, -6, 5, -2, -8, 6, -3, -10, 7, -4, -12, 8, -5, -14, 9, -6, -16, 10, -7, -18, 11, -8, -20, 12, -9, -22, 13, -10, -24, 14, -11, -26, 15, -12, -28, 16, -13, -30, 17, -14, -32, 18, -15, -34, 19, -16, -36, 20, -17, -38, 21, -18, -40
Offset: 0
Examples
The triples (k,3-k,2-2k) are (0,3,2), (1,2,0), (2,1,-2), (3,0,-4),...
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (0, 0, 2, 0, 0, -1).
Programs
-
Mathematica
CoefficientList[Series[x*(3 + 2*x + x^2 - 4*x^3 - 4*x^4)/((x - 1)^2*(1 + x + x^2)^2), {x, 0, 50}], x] (* G. C. Greubel, Sep 28 2017 *) Table[{n,3-n,2-2n},{n,0,30}]//Flatten (* or *) LinearRecurrence[ {0,0,2,0,0,-1},{0,3,2,1,2,0},100] (* Harvey P. Dale, Jun 23 2019 *)
-
PARI
x='x+O('x^50); Vec(x*(3+2*x+x^2-4*x^3-4*x^4)/((x-1)^2*(1+x +x^2 )^2)) \\ G. C. Greubel, Sep 28 2017
Formula
From R. J. Mathar, Feb 25 2009: (Start)
a(n) = 2*a(n-3) - a(n-6).
G.f.: x*(3+2*x+x^2-4*x^3-4*x^4)/((x-1)^2*(1+x+x^2)^2). (End)
Extensions
Edited by R. J. Mathar, Jun 28 2008
Comments