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!
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
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 292 |
Nodes: | 16 (2 / 14) |
Uptime: | 178:31:19 |
Calls: | 6,616 |
Calls today: | 3 |
Files: | 12,165 |
Messages: | 5,313,912 |