OFFSET
0,3
COMMENTS
LINKS
J. Devillet, Bisymmetric and quasitrivial operations: characterizations and enumerations, arXiv:1712.07856 [math.RA] (2017).
Index entries for linear recurrences with constant coefficients, signature (3,-2).
FORMULA
a(0)=0, a(1)=1, a(n+1)-2*a(n) = 2.
From Colin Barker, Dec 22 2017: (Start)
G.f.: x*(1 + x) / ((1 - x)*(1 - 2*x)).
a(n) = 3*2^(n-1) - 2 for n>0.
a(n) = 3*a(n-1) - 2*a(n-2) for n>2.
(End)
MATHEMATICA
Nest[Append[#, 2 Last@ # + 2] &, {0, 1}, 32] (* or *)
Array[3*2^(# - 1) - 2 + Boole[# == 0]/2 &, 34, 0] (* or *)
CoefficientList[Series[x (1 + x)/((1 - x) (1 - 2 x)), {x, 0, 33}], x] (* Michael De Vlieger, Dec 22 2017 *)
PROG
(PARI) concat(0, Vec(x*(1 + x) / ((1 - x)*(1 - 2*x)) + O(x^40))) \\ Colin Barker, Dec 22 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
J. Devillet, Dec 22 2017
EXTENSIONS
G.f. replaced by a better g.f. by Colin Barker, Dec 23 2017
STATUS
approved