Algo to check for recurring cycles in an array

Hi guys,

I`m trying to solve euler`s 26th problem but I`m stuck... The thing is I`ll have an array filled with integers and I want to see if there is a recurring cycle in it.

1/7 = 0.142857142857142857(..) (142857 is the recurring cycle)

So my array will be 142857142857142857(...) (to infinity since I don`t know when to stop calculating)

If only I knew how long the cycle is I would be able to solve the problem... But I can`t really tell when the cycle is over because it could be like 0.1412345 or something like that where there are repeating digits

I`m sorry if this post is too confusing but it`s hard for me to describe the problem...

Any help will be apreciated!