A while ago I ‘invented’ an interesting mathematical algorithm as follows.
Start with any whole number ‘n’.
If ‘n’ is prime, stop.
If ‘n’ is composite, list its prime factors and find the largest, let’s call it ‘m’
Let your new ‘n’ be equal to n+m+1, and repeat the whole sequence.
For instance if we start with 15:
15
Not prime, highest prime factor is 5, so add 6
21
Not prime, highest prime factor is 7, so add 8
29
Prime, stop