1
$\begingroup$

Mathematica recently offered me this expression as the result of an evaluation: HarmonicNumber[r, -r]. I initially thought this must be equivalent to Sum[1/k^r, {k, 1, r}], but it appears I'm wrong:

TrueQ[HarmonicNumber[r, -r] == Sum[1/k^r, {k, 1, r}]]

False

Can someone please tell me what the equivalent of HarmonicNumber[r, -r] is when written in Sum form? I'm sure it's a dumb question (and I'm sure I could ask MMA to do it for me, if I only knew how), but I'd appreciate an answer nonetheless.

$\endgroup$

closed as off-topic by Szabolcs, Bob Hanlon, m_goldberg, eyorble, chris Dec 12 '18 at 5:36

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Szabolcs, Bob Hanlon, m_goldberg, eyorble, chris
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ That's not what TrueQ is for. Please check its documentation. $\endgroup$ – Szabolcs Dec 11 '18 at 16:24
  • $\begingroup$ Have you looked under Details and Options in the documentation of HarmonicNumber? The sum form is given there for any integer input value. $\endgroup$ – Szabolcs Dec 11 '18 at 16:28
  • $\begingroup$ OK I will, and thank you. But can you please tell me how I can find what HarmonicNumber[r, -r] means? $\endgroup$ – Richard Burke-Ward Dec 11 '18 at 16:29
3
$\begingroup$

You were only missing a sign:

HarmonicNumber[r, -r] == Sum[1/k^-r, {k, 1, r}]

True

$\endgroup$
  • $\begingroup$ Thanks Henrik. I thought I was being dumb! I'll mark as read when the timer allows. $\endgroup$ – Richard Burke-Ward Dec 11 '18 at 16:34
  • $\begingroup$ Richard, you are always welcome. $\endgroup$ – Henrik Schumacher Dec 11 '18 at 16:53

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