← RoseCode

ROSECODE 280

Champions

Philippe_57721 · Programming ·

Consider the sequence S(n) defined by:
S(1)=2S(n)=S(n1)+GCD(S(n1),n1+(1)n) The first values are:
2,4,5,6,9,12,13,14,21,22,23,24,25,26,39,40,45,54,55,60,

We calculate the vector of first differences D(n)=S(n+1)S(n):
2,1,1,3,3,1,1,7,1,1,1,1,1,13,1,5,9,1,5,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,43,

Then, we select in this vector each value greater than all the previous ones:
2,3,7,13,43,

Find the 32nd element of this sequence.

You are given:
- M(1) = 2
- M(2) = 3
- M(10) = 2659

[My timing: 7 min] // Some solvers found it under 1 min.
There is a fascinating conjecture about this sequence of champions:
Each champion is the larger prime of a twin pair of primes