If I have a set of letters $\{a,b,c\}$ which will repeat five times, i.e. $$a,a,a,a,a,b,b,b,b,b,c,c,c,c,c,a,a,a,a,a,\cdots,$$ how can I determine what letter will be in a given position, i.e. $168$?
2026-03-26 04:51:39.1774500699
$n$-th element in a pattern of repeated elements of a set
30 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
You know one cycle of the pattern is of length $15$, since you would have {aaaaabbbbbccccc}, then repeat. Given a position, you can perform modulo $15$ to find the local index of the respective pattern you are on. For example, $168\equiv 3 \mod 15$, so you would have the third letter in the pattern, which is $'a'$.