Periodic sequence (source code)

= Periodic sequence
{wiki=Periodic_sequence}

A periodic sequence is a sequence of numbers that repeats itself after a certain number of terms. More formally, a sequence \\((a_n)\\) is considered periodic with period \\(p\\) if there exists a positive integer \\(p\\) such that for all integers \\(n\\): \\\[ a_\{n + p\} = a_n \\\] for all \\(n\\). This means that after every \\(p\\) terms, the sequence returns to the same value.