Numbers x such that x^2 divides 7^x-1 Task
There is a set of numbers x, such that x^2 divides 7^x-1.
Your task is to find these numbers. Given an input of n, the code will print the nth number that follows this rule.
Examples 1-index
In   Out
3    3
9    24
31   1140

The relevant sequence can be found here.
Rules
Shortest answer will be the winner*
Standard golfing rules apply
Loopholes are not allowed
Your answer can either be 0 or 1 indexed, please state in your answer
Haskell, 34 bytes

([x|x&lt;-[1..],mod(7^x-1)(x^2)&lt;1]!!)


This uses 0-based indexing. Usage example: ([x|x&lt;-[1..],mod(7^x-1)(x^2)&lt;1]!!) 30 -> 1140.

It's a direct implementation of the definition. It builds a list of all numbers x and picks the nth.