At the beginning the sum ... + 0.8n + ... is calculated.

function F(n) {
with(Math) {
a = pow(0.8,n)
return a
}}

I can take 0.8 + 0.8² + 0.8³ + ... = 4. The calculated sum is not exactly 4, due to the approximations.

If I change F in the following way, I can find  Σ n/((n+1)·(n+2)·(n+3)),  n from 1 to ∞

function F(n) {
with(Math) {
return  n /( (n+1)*(n+2)*(n+3) )
}}
0.2499999000000479  if a=1 b=10000000
0.24999900000351052  if a=1 b=1000000
0.24999000034998578  if a=1 b=100000
0.24990003498850202  if a=1 b=10000
0.2490034885363864  if a=1 b=1000

I can take 0.25

If I change F in the following way, I can find  Σ 1/n!,  n from 1 to ∞

function F(n) {
with(Math) {
y = 1 / Fat(n)
return y
}}
function Fat(n) { 
x=1; for (i=1; i < n; i++) {x=x*(i+1)}
return x};
1.7182818284590455  if a=1 b=200
1.7182818284590455  if a=1 b=100

I can take 1.71828182845905.

If I change F in the following way

function F(n) {
with(Math) {
y = (4/(8*n+1)-2/(8*n+4)-1/(8*n+5)-1/(8*n+6))/pow(16,n)
return y
}}

I can find:

3.141592653589793   if a=0 b=11
3.141592653589793   if a=0 b=10
3.1415926535897913  if a=0 b=9
3.1415926535897523  if a=0 b=8
3.141592653588973   if a=0 b=7
3.141592653572881   if a=0 b=6
3.141592653228088   if a=0 b=5

If I wanto to study (as n → ∞):   n

k = 1
1/k  − log(n)

I can change (and save under another name) the script in the following way:

function F(n) {
with(Math) {
y = 1/n
return y
}}

function Sum()
{
a=Number(document.dati.a.value); b=Number(document.dati.b.value);
s=0;
for (var j=a; j <= b; j=j+1) {s = Number(s + F(j))}; s = s - Math.log(b)
i=s; d=i-i0; i0=i;
document.dati.sum.value=i+'  if a='+document.dati.a.value+' b='+document.dati.b.value + '\r'+document.dati.sum.value
}

I have:

0.5772156727125051  if a=1 b=64e6
0.5772156805214053  if a=1 b=32e6
0.577215696150045   if a=1 b=16e6
0.5772157274002492  if a=1 b=8e6
0.5772157899005066  if a=1 b=4e6
0.5772159149008278  if a=1 b=2e6
0.5772161649007153  if a=1 b=1e6
0.5772206648931064  if a=1 b=1e5
0.5772656640681646  if a=1 b=1e4

We could find that the sum is γ = 0.577215664901532860606512090082402431042...  The number γ is called the Eulero-Mascheroni constant (Eulero showed that this limit exists in 1734, Lorenzo Mascheroni studied its value in 1790). The constant γ is important in many mathematical areas. To date (2020) it is not yet known whether γ is rational or not.

back