# Question:master theorem recurrence incident

## Question:master theorem recurrence incident

Greetings to all.

I have run into a curious numeric event while computing Master theorem recurrences at this math.stackexchange.com link.

I do have to say that this one has me worried. I am referring to Maple 15 (X86 64 LINUX).

Try the following program in a new Maple session.

```T := proc(n)
option remember;
if n = 0 then return 0 end if; 9*T(floor(1/3*n)) + n*(1 + ilog[3](n))^3
end proc;

T_ex := proc(n)
local m, d;
option remember;
d := convert(n, base, 3);
m := ilog[3](n);
add(3^j*(1 + m - j)^3*add(d[k + 1]*3^k, k = j .. m), j = 0 .. m)
end proc;

T(3^22-1)-T_ex(3^22-1);
```

The result is the following error message:

```Error, (in T_ex) invalid subscript selector
```

Now try it again, in a new Maple session, but enter the following command first.

```Digits := 50;
```

Now the result is

```0
```

Consider the following program:

```T := proc(n)
option remember;
if n = 0 then return 0 end if; 9*T(floor(1/3*n)) + n*(1 + ilog[3](n))^3
end proc;

T_upper := proc(n)
local m;
option remember;
m := ilog[3](n); 3^(2*m + 2)*sum(3^(-j)*j^3*(1 - 3^(-j)), j = 1 .. m + 1)
end proc;

T(3^22-1)-T_upper(3^22-1);
```

The result is

```-30454808964204479209326
```

But if you precede the program with the command

```Digits:=50;
```

the result is once more

```0
```

This is reproducible (restart Maple every time) and quite frankly, seems rather serious to me. Could someone please look into this.

Marko Riedel

﻿