# Playing with c = (a*b) mod (a+b)

Jack Brennen jb at brennen.net
Mon Jul 7 20:22:11 CEST 2008

```That one ends in a loop fairly quickly:

2, 9, 7, 15, 17, 31, 47, 53, 91, 71, 143, 95, 19, 95, 95, 95, ...

Playing around with different starting pairs, it looks like all
starting pairs may end up in a loop, or by going to the pair (0,0)
which is either a loop or a singularity, depending on whether you
take 0 mod 0 as being 0 or being undefined.  Furthermore, you can go
an arbitrarily long time without looping.  Take for large a:

.., 6*a+6, 6*a, ...

The next term is 6*a-6, and progressively it goes down the
ladder by steps of 6 until it terminates at ..., 18, 12, 6, 0, 0.

In a few minutes of searching, the longest sequence I could find
which eventually loops without going to zero was the sequence
starting with (29,574), which hits 855 at the 79th term and then
stays at 855.

Jack

Eric Angelini wrote:
> Hello MathFun & SeqFans,
>
>   Start S = 2, 9,...
>
> Next term is (2*9)mod(2+9)
>                18 mod 11 = 7
>   S = 2, 9, 7,...
>
> Next term is (9*7)mod(9+7)
>                63 mod 16 = 15
>   S = 2, 9, 7, 15,...
>
> Next term is (7*15)mod(7+15)
>                105 mod 22 = 17
>   S = 2, 9, 7, 15, 17,...
>
> Next term is (15*17)mod(15+17)
>                255 mod 32 = 31
>   S = 2, 9, 7, 15, 17, 31,...
>
> Next term is (17*31)mod(17+31)
>                527 mod 48 = 47
>  S = 2, 9, 7, 15, 17, 31, 47,...
>
> Does this end in a loop?
> If yes, is there another start
> which doesn't?
>
> Best,
> É.
>
>
>
>
>
>
>

```