A381643 a(n) = 4^n - (n+6)*3^(n-1) + (n+2)*2^(n-1).
0, 0, 0, 3, 34, 245, 1436, 7483, 36198, 166545, 739792, 3203783, 13617242, 57072925, 236680068, 973578003, 3979881166, 16191039785, 65622734264, 265197899743, 1069304363970, 4303927449525, 17299346486380, 69458798306603, 278650899449654
Offset: 0
Examples
For n=4 the 34 words that use 0 at least twice and 1 at least once are 0001 (4 of this type), 0011 (6 of this type), 0012 (12 of this type), 0013 (12 of this type).
Links
- Index entries for linear recurrences with constant coefficients, signature (14,-77,208,-276,144).
Programs
-
Python
def A381643(n): return ((1<
Chai Wah Wu, Mar 15 2025
Formula
E.g.f.: (exp(x)-x-1)*(exp(3*x)-exp(2*x)).
G.f.: x^3*(3 - 8*x)/((1 - 4*x)*(1 - 5*x + 6*x^2)^2). - Stefano Spezia, Mar 07 2025
Comments