10
$\begingroup$
thissum = Sum[2^k n/(n - k) Binomial[n - k, 2 k], {k, 0, n/3}];

Mathematica finds:

HypergeometricPFQ[{1/3 - n/3, 2/3 - n/3, -(n/3)}, {1/2, 1 - n}, 27/2]

In fact the sum has the simple closed form expression: $2^{n-1}+\cos(n \pi/2)$. Try it!

If I use FullSimplify and specify that n is a positive integer it returns ComplexInfinity. How can I get Mathematica to give the simpler answer?

$\endgroup$

2 Answers 2

13
$\begingroup$

Writing:

Sum[2^k n/(n - k) Binomial[n - k, 2 k] // FunctionExpand, {k, 0, n/3}] // ComplexExpand

I get:

2^(-1 + n) + Cos[(n \[Pi])/2]

which is what you want.

$\endgroup$
5
$\begingroup$

Just in case for the next time it pays to have several methods. Here is a different way:

Table[Sum[2^k n/(n - k) Binomial[n - k, 2 k], {k, 0, n/3}], {n, 3, 39,3}]
FindSequenceFunction[%, n] // ComplexExpand

{4, 31, 256, 2049, 16384, 131071, 1048576, 8388609, 67108864, \
536870911, 4294967296, 34359738369, 274877906944}

2^(-1 + 3 n) + Cos[(n \[Pi])/2]
$\endgroup$
2
  • $\begingroup$ This is interesting but it isn't giving the correct solution. If you change the enumerations in the table from {n,3,39,3} to {n,1,8} it gives the correct answer. $\endgroup$
    – JEP
    Mar 19, 2017 at 18:58
  • $\begingroup$ Hi JEP; I left it that way on purpose. Due to the way FindSequenceFunction fits this uses 1,2,3,4,5... instead of your 3,6,9,12... I think it makes more sense to count by ones instead of threes. But it is a simple matter to change it back. $\endgroup$
    – bobbym
    Mar 19, 2017 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.