Question: Finding possible bases for a given periodlenght of an inverse squarefree number

For example: n=78 (is squarefree because 2 x 3 x 13)

Possible periodlenghts in different bases for 1/78  are  {2,3,4,6,12} this is calculated with Multiplicative-Order (Maple).

Now we pick a period from above, for example 6.

The question is:

Which possible bases exist for 1/78 with  periodlenght of 6 ?

The result is: possible bases calculated with Multiplicative-Order
are {17,23,29,35,43,49}.

Question:
Is there a formular to calculate the bases directly or with less calculations than the Maple-Command ?

Thanks for helping :)

Please Wait...