Task 2. Two frogs leave the shore at the same time. They move along a path of 18 lilies (a type of aquatic plant). The first one jumps on every third lily,
while the second one jumps on every second lily. On how many and which lilies will both frogs jump?
Solution. First method. The first frog will jump on lilies 3, 6, 9, 12, 15, and 18, while the second frog will jump on lilies $2,4,6,8,10,12,14,16$ and 18 (see diagram). Therefore, the two frogs will land on the same lily three times, specifically on lilies with numbers 6, 12, and 18.

First frog

Second frog

![](https://cdn.mathpix.com/cropped/2024_06_05_06e08f885cfce663e921g-04.jpg?height=726&width=954&top_left_y=579&top_left_x=412)

Second method. The two frogs will land on the same lily if its number is divisible by both 2 and 3, i.e., if it is a multiple of 2 and 3. Since $\operatorname{LCM}(2,3)=6$ and 18: LCM(2,3) $=18: 6=3$, we conclude that the two frogs will land on the same lily three times, specifically on lilies with numbers 6, 12, and 18.