Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.soft-sys.math.maple > #1285

Re: No harmony with the harmonics.

Newsgroups comp.soft-sys.math.maple
Date 2017-10-26 11:46 -0700
References <77089042-3be5-4d92-b6c4-4c8ca99c31dd@googlegroups.com>
Message-ID <79fdefd4-b72f-4d0f-be70-013c28e02ac9@googlegroups.com> (permalink)
Subject Re: No harmony with the harmonics.
From acer <maple@rogers.com>

Show all headers | View raw


On Thursday, October 26, 2017 at 1:04:03 PM UTC-4, Peter Luschny wrote:
> seq(harmonic(-3/8+(1/8)*(-1)^(n+1), 1-n), n=1..6);
> -1/4, harmonic(-1/2, -1), harmonic(-1/4, -2), harmonic(-1/2, -3), ...
> 
> A rather dull answer. Let's try with evalf:
> 
> seq(evalf(harmonic(-3/8+(1/8)*(-1)^(n+1), 1-n)), n=1..6);
> -.2500000000, -.1250000000, -0.1562500000e-1, 0.1562500000e-1, ...
> 
> It would be so much nicer to get rational numbers!
> Table[HarmonicNumber(-3/8+(1/8)*(-1)^(n+1), 1-n), {n,1,6}]
> -1/4, -1/8, -1/64, 1/64, 5/1024, -1/128, ...
> 
> Now let's try a slight variant:
> 
> seq(harmonic(-7/8+(1/8)*(-1)^(n+1), 1-n), n=1..6);
> Error, (in harmonic) numeric exception: division by zero
> 
> The docs say: "When the first parameter is a negative integer 
> an exception (error) is raised, signaling the event 'division_by_zero'." 
> 
> Hmm, no problem here:
> Table[HarmonicNumber(-7/8+(1/8)*(-1)^(n+1), 1-n), {n,1,6}]
> -3/4, 0, 1/64, 0, -5/1024, 0, ...
> 
> So let's see if the solution of MMA makes sense and add the two variants.
> 
> Table[(1/2)*4^n*(-HarmonicNumber(-7/8+(1/8)*(-1)^(n+1), 1-n)
>       + HarmonicNumber(-3/8+(1/8)*(-1)^(n+1), 1-n)), {n,1,11}]
> 
> 1, -1, -1, 2, 5, -16, -61, 272, ...
> 
> OMG, already Leonhard knew this!


I'm going to submit a bug report that this task is not much easier (AFAIK),


L:=[seq(harmonic(-3/8+(1/8)*(-1)^(n+1), 1-n), n=1..6)];

      L := [-1/4, harmonic(-1/2, -1), harmonic(-1/4, -2),
            harmonic(-1/2, -3), harmonic(-1/4, -4), harmonic(-1/2, -5)]


map(convert,L,compose,Zeta,elementary,LerchPhi,elementary);

                           -1                -1
              [-1/4, -1/8, --, 1/64, 5/1024, ---]
                           64                128

Back to comp.soft-sys.math.maple | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

No harmony with the harmonics. Peter Luschny <peter.luschny@gmail.com> - 2017-10-26 10:04 -0700
  Re: No harmony with the harmonics. acer <maple@rogers.com> - 2017-10-26 11:46 -0700
    Re: No harmony with the harmonics. acer <maple@rogers.com> - 2017-10-27 10:10 -0700

csiph-web