Problem 2748 · Easy

Number of Beautiful Pairs

Count first digits seen so far, then for each new number add the earlier first digits that are coprime with its last digit.

Open the interactive visualisation