Let ⌈x⌉ denote the smallest integer greater than or equal to x. The sequence (ai) is defined as follows: a1=1, and for all i≥1,
ai+1=min(7⌈(ai+1)/7⌉, 19⌈(ai+1)/19⌉)
Compute a100.
Two computer solutions, and both went with dumb brute force and did not even try to engage the puzzle. We can do better that mindlessly computing 100 terms.
Start by analyzing the operation f(a) = p*ceil[(a+1)/p].
Let a=p*q+r with r on the interval 0 to p-1. Then
p*ceil[(a+1)/p]
= p*ceil[((p*q+r)+1)/p]
= p*(q+ceil[(r+1)/p])
= p*(q+1)
p*(q+1) is the smallest multiple of p larger than p*q+r. So that is what f(a) is doing - choosing the smallest multiple of p greater than a.
Now the whole operation defining the series a(i) can be defined as asking for what is smaller, the next multiple of 7 or the next multiple of 19.
7*19=133 so a(i) mod 133 will be periodic, with a period of 7+19-1=25. Then every 25th term is a multiple of 133.
The sequence starting at a(1)=1 is identical to a(1)=0, 0 is a multiple of 133. Then a(26)=133, going further a(25k+1)=133*k.
Then a(101) = 133*4 = 532.
a(100) would be the larger of a(101)-7=525 and a(101)-19=513. Obviously 525>513 so a(100)=525.