load(simplify_sum)$
Reported via SageMath issue #42894 and PR #42981.
Correct finite sum: 42
sum((3*k)*binomial(4, 3*k-6), k, 0, inf);
=> 3 * 'sum(binomial(4, 3*k-6)*k, k, 0, inf) (unevaluated)
simplify_sum(sum((3*k)*binomial(4, 3*k-6), k, 0, inf));
=> 36 WRONG, should be 42
Larger case:
simplify_sum(sum((3*k)*binomial(11, 3*k-13), k, 0, inf));
=> 24 WRONG, should be 12630
The summand has finite support: binomial(n, 3*k-n-2) is nonzero only for 0 <= 3*k-n-2 <= n. simplify_sum converts the summand to a hypergeometric term and evaluates it without restricting to the finite support, producing a spurious contribution.
A similar issue was previously reported for sum(binomial(1,n), n, 0, oo) returning 3 instead of 2.
Closed form: S(n) = 2^n*(3*n+4)/6 - 2*(-1)^n/3
Thanks for the bug report. Can you clarify the final comment: "Closed form:
S(n) = 2^n*(3*n+4)/6 - 2*(-1)^n/3"? I don't understand what that is referring to.