login
A393175
Sum of the heights of symmetric peaks over all compositions of the integer n.
2
0, 0, 0, 0, 1, 4, 12, 33, 84, 204, 481, 1108, 2508, 5601, 12372, 27084, 58849, 127060, 272844, 583137, 1241172, 2632140, 5563873, 11726932, 24652236, 51701217, 108195924, 225978828, 471131617, 980611156, 2037918156, 4229228001, 8765239380, 18144045516, 37515224545, 77484716116, 159877966284
OFFSET
0,6
COMMENTS
A symmetric peak in a composition p = (p_1, ..., p_k) is an index i, 1 <= i <= k-2, such that p_i = p_{i+2} < p_{i+1}. Its height is defined as p_{i+1} - p_i.
FORMULA
a(n) = (7*n-24)/49*2^(n-1) + (-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/3.
G.f.: -x^4/((x-1)*(x^2+x+1)*(-1+2*x)^2). - Alois P. Heinz, Feb 04 2026
a(n) = (98 + 3*2^n*(7*n-24) + 2*(-1)^n * (3^(3/2)*sin(Pi*n/3) - 13*cos(Pi*n/3)))/294. - Vaclav Kotesovec, Feb 05 2026
EXAMPLE
For n=5, there are three compositions with at least one symmetric peak: 131, 1211, and 1121. The sum of the heights of symmetric peaks over these compositions is 2+1+1 = 4.
MAPLE
# a(n) = hsp(n) from the closed form
a := proc(n::nonnegint)
local expr;
expr :=
(7*n - 24)/49 * 2^(n-1)
+ (-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/3;
# simplify (the complex parts cancel)
return simplify(expr, symbolic);
end proc:
# first 20 terms
seq(a(n), n=0..20);
MATHEMATICA
A393175[n_] := (98 + 3*2^n*(7*n - 24) + 2*(-1)^n*(3^(3/2)*Sin[#] - 13*Cos[#]))/294 & [Pi*n/3];
Array[A393175, 50, 0] (* or *)
LinearRecurrence[{4, -4, 1, -4, 4}, {0, 0, 0, 0, 1}, 50] (* Paolo Xausa, Mar 28 2026 *)
CROSSREFS
Cf. A393177.
Sequence in context: A225894 A318637 A227554 * A305778 A343561 A104747
KEYWORD
nonn,easy
AUTHOR
W. Asakly, Feb 04 2026
STATUS
approved