In the given series of numbers (0-9) or a similar series of numbers, How can a pattern be searched?
3 2 4 8 0 8 7 3 8 7 0 0 4 9 6 3 9 7 4 5 7 3 9 6 6 6 7 1 6 3 4 7 7 4 5 1 4 9 3 3 7 9 3 3 9 1 3 0 4 8 0 1 4 5 6 2 8 2 7 4 2 4 6 2 1 0 1 8 4 8 6 2 0 5 9 8 7 7 5 8 8 6 6 6 9 2 6 6 2 8 2 7 8 8 9 7 9 7 7 3 5 2 7 6 6 8 4 2 5 4 3 4 4 8 3 3 6 9 8 6 1 5 8 8 6 3 1 6 7 2 3 8 4 0 5 4 3 8 3 4 9 8 5 5 8 4 2 6 6 3 2 5 0 9 7 2 0 6 6 0 8 6 9 3 4 4 6 8 0 8 4 6 6 5
Is there an algorithm for the same or can an algorithm be written?
Up-till now have been able to check the frequency of the numbers before and after a given number and check for chances of it re-appearing in series.The Patterns to seek could be Arithmetic Sequences,Geometric sequences,Special Sequences, Square numbers, Cube numbers, Fibonacci numbers, etc.
It's been done in excel as my mathematics is the greatest.
Sub Tester()
Dim arr, r, b, a
arr = Range("A1:A20").Value
Range("D4").Resize(10, 10).ClearContents
Range("D17").Resize(10, 10).ClearContents
For r = 1 To UBound(arr, 1) - 1
b = arr(r, 1)
a = arr(r + 1, 1)
With Range("D4")
.Offset(b, a).Value = .Offset(b, a).Value + 1
End With
With Range("D17")
.Offset(a, b).Value = .Offset(a, b).Value + 1
End With
Next r
End Sub
Please help. Thanks in advance.