login
A393177
Sum of the depths of symmetric valleys over all compositions of the integer n.
2
0, 0, 0, 0, 0, 1, 2, 7, 17, 43, 101, 236, 535, 1202, 2662, 5846, 12730, 27543, 59244, 126813, 270267, 573825, 1214223, 2561602, 5389505, 11311624, 23688464, 49507372, 103275620, 215073005, 447189526, 928466099, 1925106277, 3986560727, 8245817785, 17037028248
OFFSET
0,7
COMMENTS
A symmetric valley is an index i such that p_i = p_{i+2} > p_{i+1}. Its depth is defined as p_i - p_{i+1}.
FORMULA
a(n) = (-6*n+7)/108*(-1)^n + (21*n-79)/1323*2^n + (-33-15*i*sqrt(3))*(-2)^n/(441*(1+i*sqrt(3))^(n+1)) + (-33+15*i*sqrt(3))*(-2)^n/(441*(1-i*sqrt(3))^(n+1)) + 1/12.
G.f.: -x^5/((x-1)*(x^2+x+1)*(x+1)^2*(-1+2*x)^2). - Alois P. Heinz, Feb 04 2026
a(n) = (441 + 2^(n+2)*(21*n-79) + (-1)^n*(49*(7 - 6*n) - 468*cos(Pi*n/3) + 108*sqrt(3)*sin(Pi*n/3)))/5292. - Vaclav Kotesovec, Feb 05 2026
EXAMPLE
For n=7, there are 6 compositions with at least one symmetric valley: 11212, 12121, 21211, 2122, 2212, 313. The sum of the depths of symmetric valleys over these compositions is 7.
MATHEMATICA
A393177[n_] := (441 + 2^(n + 2)*(21*n - 79) + (-1)^n*(49*(7 - 6*n) - 468*Cos[#] + 108*Sqrt[3]*Sin[#]))/5292 & [Pi*n/3];
Array[A393177, 50, 0] (* or *)
LinearRecurrence[{2, 3, -3, -6, -3, 4, 4}, {0, 0, 0, 0, 0, 1, 2}, 50] (* Paolo Xausa, Mar 28 2026 *)
CROSSREFS
Cf. A393175.
Sequence in context: A370304 A375821 A175120 * A239357 A106910 A108479
KEYWORD
nonn,easy
AUTHOR
W. Asakly, Feb 04 2026
STATUS
approved