I kinda want to share this experience and not sure where else to do it so you lovely people can have it.
So in trying to fall asleep, I started doing a thing where I pick a number and start counting backwards by 7. 700, 693, 686...etc.
To mix things up I'd start picking different starting points, 600..., 900..., etc.
Then I realized that I'd run into interesting numbers depending on my starting point. 1000...888. 800...555. 600...222.
That made me think, huh, is it true then that every integer is represented by this counting scheme? Formalized something like y = 7x + 100C?
I thought about it a bit more, changing C by 1 and seeing where the "final" positive integar would be counting down. 700...0, 600...5, 500...3, 400...1, 300...6, 200...4, 100...2.
What the heck? What does 100 and 7 have to do with this interval of 2? Well when you start from 100 counting down you are left with 2...ah its the remainder of 100 / 7.
So then does this apply as long as you pick 2 numbers with a remainder that doesnt overlap nicely? Since this doesnt work if i did something like 100 and 6, remainder being 3 means the final number would end up like 0, 2, 4, 0...
Ah, that's because 100 and 6 have a common divisor of 2, so that's why the gaps are size 2. So the two numbers have to have a greatest common denominator of 1...then you can basically write any integer as the sum of Ax + By, where A and B are have GCD = 1 and x and y are some other set of integers.
And at this point, when I got to this conclusion, I decided to google if something like this is real and of course it is, Bézout Identity exists and basically says what I came up with, but even more broad.
So yeah, going through this multi night exercise not only helped me sleep, but also gave me some appreciation into mathematic theory development. I suck at real math theory (real number proofs was my worst subject in uni) but when doing this it made me think how many math theories kind of just appear through weird mental exercises with numbers, especially some of the older lemmas we take for granted now.