Notation of how many times an expression is true

42 Views Asked by At

This is my first time posting on here so apologies if I'm breaking formatting rules. Also, I'm not a native English speaker, yadda yadda.

So a few years ago I found something in school when the lesson we usually had was cancelled. I was playing around with my calculator, found that it had a random integer generator and wrote down a list of random numbers between 1 and 6.

Underneath that list I counted how many times the number above had already appeared before that modulo 6, and I wrote that down in the second row. (I was really bored). I repeated the process a couple of times and noticed something that I found really strange and surprising: after one iteration, the rows were identical alternatingly, if you know what I mean. So the second row was identical to the fourth, the third to the fifth, the fourth to the sixth and so on.

Now, a few years later and I'm in the third year of high school. My maths teacher now is an absolutely brilliant man, and a great teacher. I wish I had him earlierm he's the kind of person who can really get people excited about maths. Anyways, I was thinking about this a few weeks ago and I thought: "Why don't I ask him, he'll surely be able to at least help me understand why this happens". And so I did.

To make a long story short: I'm trying to notate this rigourously. Here's what I came up with (it's most likely wrong, but bear with me here)

$A_{n+1}(x) = \sum_{y=1}^{x}A_{n}(y) = A_{n}(x) \mod \max(A_{0}) $

So that is indeed quite a mess. Here's what I mean:
"In the list $\ A_{n+1}$, the x-th element is defined as the sum of every time that every element before the x-th one is equal to the y-th, y being a number that counts up to x. That all modulo the biggest number that was in the original list, which is$\ A_{0}$."

I think an example would be useful here. Say:
$\ A_{0} = [2, 4, 6, 5, 5, 2, 4, 3, 1, 1, 5, 6, 3] $
That would make:
$\ A_{1} = [1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 3, 2, 2] $
And as a result,
$\ A_{2} = [1, 2, 3, 4, 1, 2, 3, 5, 6, 4, 1, 5, 6] $
And the claim is thus that $\ \forall x \geq 1 : A_{x} = A_{x+2} $

So, that's my question. How do I notate this?
I hope I wasn't being confusing. Thanks in advance.