14

I'm using Mathematica 8. When I try the command

Sum[r^n Floor[n/2], {n, 0, Infinity}]

I get

r^2/((-1 + r)^2 (1 + r)) 

which is correct, but starting from 1 instead of 0:

Sum[r^n Floor[n/2], {n, 1, Infinity}]

gives

r/((-1 + r)^2 (1 + r))

which is not. What's going on?

Arnoud Buzing
  • 15,383
  • 3
  • 20
  • 50
Andrew
  • 1,041
  • 1
  • 16
  • 24
  • 4
    wow! looks like a bug to me. adding a zero to the sum should not make a difference. – Nasser Dec 31 '11 at 22:42
  • 1
    @NasserM.Abbasi, you should post that as an answer, as it is correct. I'd drop the sarcasm, though. – rcollyer Jan 01 '12 at 02:37
  • 3
    Similar problem when `Floor` is replaced with `Ceiling`. – kglr Jan 01 '12 at 03:14
  • 4
    Another problem: when `IntegerPart[n/2]` is used instead of `Floor[n/2]` both sums are incorrect:`Sum[(r^n ) IntegerPart[n/2], {n, 0, Infinity}]` gives `(2*r^2)/((-1 + r)^2*(1 + r))` and `Sum[(r^n ) IntegerPart[n/2], {n, 0, Infinity}]` gives `r/((-1 + r)^2*(1 + r))`. – kglr Jan 01 '12 at 03:40
  • @Verbeia Having merely a tag seems to work quite well, though. – Andrew Jan 01 '12 at 14:44
  • 1
    @AndrewMacFie No, not really. We have problems with people not understanding Mathematica is a language as well as an IDE and more. Many questions were downvoted or closed because people thought they were related to mathematics and hence were off-topic. With a dedicated site we can broaden the scope considerably. – Sjoerd C. de Vries Jan 01 '12 at 14:58
  • Case in point: the question after yours just got closed for this reason (see http://stackoverflow.com/q/8692674/615464). Hope it get reopened soon. – Sjoerd C. de Vries Jan 01 '12 at 16:20
  • @AndrewMacFie also many questions (eg about configuration, stylesheets, etc) would be off topic here on StackOverflow. We want to consolidate questions about Mathematica in one place. – Verbeia Jan 01 '12 at 19:41

1 Answers1

8

This is a bug. Please submit bug report to WRI (email: support@wolfram.com)

Arnoud Buzing
  • 15,383
  • 3
  • 20
  • 50
Nasser
  • 12,849
  • 6
  • 52
  • 104
  • Should I submit it here: http://www.wolfram.com/support/contact/email/?topic=Feedback? I submitted some bugs there before but they didn't get fixed. – Andrew Jan 01 '12 at 14:23
  • @AndrewMacFie the email address is support@wolfram.com. Bugs may take one or more versions to get removed, so don't expect an immediate fix. – Sjoerd C. de Vries Jan 01 '12 at 14:49