OFFSET
1,1
COMMENTS
Strings of length 2n+2 over the alphabet {U, R} with n Rs and avoiding UU or RRR as substrings.
Also number of binary words with 3 1's and n 0's that do not contain the substring 101. a(2) = 5: 00111, 10011, 11001, 11100, 01110. - Alois P. Heinz, Jul 18 2013
Let (b(n)) be the p-INVERT of A010892 using p(S) = 1 - S^2; then b(n) = a(n+1) for n >= 0. See A292301. - Clark Kimberling, Sep 30 2017
From Gus Wiseman, Oct 13 2022: (Start)
Also the number of integer compositions of n+3 with half-alternating sum n-1, where we define the half-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A + B - C - D + E + F - G - ... For example, the a(1) = 2 through a(4) = 10 compositions are:
(112) (122) (132)
(1111) (212) (222)
(1211) (312)
(2111) (1311)
(11111) (2211)
(3111)
(11112)
(12111)
(21111)
(111111)
(End)
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Ângela Mestre, José Agapito, Square Matrices Generated by Sequences of Riordan Arrays, J. Int. Seq., Vol. 22 (2019), Article 19.8.4.
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1). - R. J. Mathar, May 22 2010
FORMULA
a(n) = 1/6 * n (11 + n^2).
From R. J. Mathar, May 22 2010: (Start)
a(n) = A140226(n)/2.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
G.f.: x*(2-3*x+2*x^2)/(x-1)^4. (End)
MAPLE
a:= n-> n/6*(11+n^2): seq(a(n), n=1..40);
MATHEMATICA
CoefficientList[Series[(2-3*x+2*x^2)/(x-1)^4, {x, 0, 50}], x] (* Vincenzo Librandi, Jul 04 2012 *)
PROG
(Magma) I:=[2, 5, 10, 18]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..50]]; // Vincenzo Librandi, Jul 04 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Shanzhen Gao, May 13 2010
EXTENSIONS
More terms from R. J. Mathar, May 22 2010
STATUS
approved