# Which machine learning algorithm can be used to identify patterns in a large file of numbers?

I'm new to machine learning and have many questions, but today I want to know if my case can be solved by machine learning, and if the answer is yes, I would like to know what to learn first and which lessons should I follow to accomplish that.

So my case is such: I have numbers, from 0 to 65.535. These numbers are randomly written in the doc (text file, any format). For example: , 15.623, 14, 0, 64.322, 5, 5, 15.623, 14, 0, 64.322, 5, 35.2323, 123, 532, 5.764, and etc. They are not limited in the quantity and can be repeated.

I want to take these numbers, find patterns inside the whole file and shrink the data, but remember the positions for reverse engineering. For example: 5, 15.623, 14, 0, 64.322, 5, 5, 15.623, 14, 0, 64.322, 5, 35.2323, 123, 532, 5.764. I can see that 5 is followed by 15.623 in 2 cases, and their positions are 0, 1, and 7, 8. I want to assign 5, 15.623 a new character with a marker (not to confuse with the original numbers) = *1. So my new text would look like this: *1, 14, 0, 64.322, 5, *1, 14, 0, 64.322, 5, 35.2323, 123, 532, 5.764.

So I will have a new file, much smaller in character count, and another code where I save the assigned numbers to new characters.

The reason I want to use machine learning is the following: I want to reduce character count in my original file and finding patterns in millions of numbers can drastically reduce the count. Also, there will be MANY files with millions of numbers inside and I want to train the AI to faster identify patterns and deliver the best method possible.

How to do it, what I should learn and what direction I should take to accomplish that?