# Maple's magical bounds break even the simplest tasks.

7 views

### peter....@gmail.com

May 12, 2023, 4:33:17 PMMay 12
to
With Maple 2023.0:

a := n -> denom(add((n-j)/j, j=1..n)):
b := n -> denom(n*harmonic(n)):

seq(a(n), n = 1..13);
seq(b(n), n = 1..13);

1, 1, 2, 3, 12, 10, 20, 35, 280, 252, 2520, 2310, 27720
1, 1, 2, 3, 12, 10, 20, 35, 280, 252, 2520, 2310, 27720

seq(print([n, a(n)]), n=599..600);
seq(print([n, b(n)]), n=599..600);

[599, 24518...43033600]
[600, 44775...38628544]

[599, 1]
[600, 1]

### Nasser M. Abbasi

May 13, 2023, 10:17:43 PMMay 13
to
a(n) is not the same as b(n) for large n. They give different
results starting at n=501.

b := n -> denom(n*harmonic(n)):
a := n -> denom(add((n-j)/j, j=1..n)):

b(501)
1
a(501)
1949158278614846....34240

So if you limit the print to n=500, it works

seq(lprint([n, b(n)]), n=499..500);
[499, 4892426340611412598120499299869225038728212308035354645714708753146045919\
8933676282116072023975502328168545495423118821451779568011772436268745785346466\
134503715040454880025595359981443379389168637406283325898144000]
[500, 4882641487930189772924258301269486588650755883419283936423279335639753828\
0535808929551839879927551323512208404432272583808876008875748891396208293775773\
202234707610373970265544169261480492630390300131470759246347712]

seq(lprint([n, a(n)]), n=499..500);
[499, 4892426340611412598120499299869225038728212308035354645714708753146045919\
8933676282116072023975502328168545495423118821451779568011772436268745785346466\
134503715040454880025595359981443379389168637406283325898144000]
[500, 4882641487930189772924258301269486588650755883419283936423279335639753828\
0535808929551839879927551323512208404432272583808876008875748891396208293775773\
202234707610373970265544169261480492630390300131470759246347712]

Now

seq(lprint([n, b(n)]), n=500..501);
[500, 4882641487930189772924258301269486588650755883419283936423279335639753828\
0535808929551839879927551323512208404432272583808876008875748891396208293775773\
202234707610373970265544169261480492630390300131470759246347712]
[501, 1]

seq(lprint([n, a(n)]), n=500..501);
[500, 4882641487930189772924258301269486588650755883419283936423279335639753828\
0535808929551839879927551323512208404432272583808876008875748891396208293775773\
202234707610373970265544169261480492630390300131470759246347712]
[501, 1949158278614846216736230858790214207046209933500712150268774185884133264\
6920482606607520910150719091222438484803302428666217967615069417723037243024260\
75937513277859240329961843084290638428358894216825180009834240]

Are these supposed to give same result for any n, no matter how
large it is?

--Nasser

--Nasser