OFFSET
0,2
COMMENTS
a(n) is the number of binary words of length n where exactly one of each kind of letter that appears is marked. - John Tyler Rascoe, Jul 16 2025
LINKS
T. D. Noe, Table of n, a(n) for n = 0..500
Index entries for linear recurrences with constant coefficients, signature (8,-25,38,-28,8)
FORMULA
From Ralf Stephan, Sep 02 2003: (Start)
a(0) = 1, a(n) = (n^2 - n)*2^n/4 + 2*n.
G.f.: 1+(2*x*(7*x^3-10*x^2+5*x-1))/((x-1)^2*(2*x-1)^3). - Harvey P. Dale, Apr 04 2011
EXAMPLE
a(2) = 6 counts: (1#,1), (1,1#), (1#,2#), (2#,1#), (2#,2), (2,2#) where # denotes a mark. - John Tyler Rascoe, Jul 16 2025
MATHEMATICA
CoefficientList[Series[1+(2x(7x^3-10x^2+5x-1))/((x-1)^2 (2x-1)^3), {x, 0, 30}], x] (* Harvey P. Dale, Apr 04 2011 *)
Table[If[n == 0, 1, (n^2 - n) 2^n/4 + 2*n], {n, 0, 30}] (* T. D. Noe, Apr 04 2011 *)
PROG
(PARI)
A_x(N) = {my(x='x+O('x^(N+1))); Vec(serlaplace((1+x*exp(x))^2))} \\ John Tyler Rascoe, Jul 16 2025
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved
