# Four eight seven

1) Notation: the reciprocal of the prime p is 1/p.

When expressed in a given base 1/p produces either an exact result, or a repeating set of figures; in base ten we call these recurring decimals; for other bases some people use "basimals".

In base ten the decimal representation of 1/3 is 0·33333... with the figure 3 repeating; in base twelve the basimal for 1/5 is 0·2497 2497 ... with the 2497 group repeating.

One third has 1 repeating digit in base ten.
Here we use the notation f(p) for the number of digits in the repeating period, so f(3)=1 in base ten and f(5)=4 in base twelve. With this notation the minimum number of figures in the repeating period is 0 (no figures repeat) and the maximum is p-1.

2) Powers of primes.

The square of 1/p has p.f(p) digits; so if f(5) is 4 in base twelve, then f(5x5) is 5 x f(5) = 5 x 4 = 20 digits.
The cube of 1/5 will have 5 x f(5x5) or 5 x 20 = 100 digits.

In general f(p^n)= p^(n-1)f(p). (A)

But there are exceptions...

One third in base ten has 1 digit and so does its square, one-ninth, while our formula (A) above says it should have 3.

Similar exceptions can be found when using bases other than ten, and can be found to have an underlying rule; but there are some which do not have an obvious rule (i.e. we haven't found one yet...)

One-third belongs to a group of primes for which the square (or higher powers) are one unit above or below the base in which they are expressed.
In base ten f(3) and f(3x3) both equal 1; and 3 x 3 = 10-1
In base twenty-six f(5) and f(5x5) both equal 1; 5 x 5= 26-1.

These exceptions occur when b = p^n±1, the letter b standing for the base. More generally b = mp^n±1 where m is any integer.

• f(p^2) = f(p) = 1 in base Np^2+1
• f(p^2) = f(p) = 2 in base Np^2-1, and if you use reverse notation, then the 2 digits become 1 (i.e. one digit positive and negative)

Now we come to the interesting bit; there are some primes which do not fall into this category and do not appear to obey any special rule.

The only one I knew of in base ten was the expression for 1/487; in base ten f(487)=486 (the maximum possible); and f(487^2) is also 486. Question - why is this so? And - are there more exceptions among higher primes in base ten - or in some other base other than ten?

Here is a list of "487" type exceptions - i.e. those for which I have found no rule yet. So far I have kept to small primes and bases up to base 30. With a bit more time I shall extend the search into three-figure primes and beyond.

Prime f(p) f(p^2) base f(p)=p-1? 487 486 10 yes, full period 5 4 7 yes, full period 11 5 3 no, ½ period 11 5 9 no, ½ period 29 28 14 yes, full period 5 4 18 yes, full period 7 3 18 no, ½ period 37 36 18 yes, full period 7 6 19 yes, full period 13 12 19 yes, full period 13 3 22 no, ¼ period 13 6 23 no, ½ period 11 5 27 no, ½ period 19 9 28 no, ½ period 23 22 28 yes, full period 7 3 30 no, ½ period

Base twelve has been checked as far as p=101; no exceptions so far.

There you have the "487 Problem" (for want of a better name. Comments - and solutions - welcome!

Results for f(p^2) = f(p)

 p base form 5 Np^2 ± 7 (i.e. bases 7, 18, 24 ..) 7 Np^2 ± 18 and Np^2 ± 19 11 Np^2 ± 3, 9, 27, 40 13 Np^2 ± 19, 22, 23, 70, 80 17 Np^2 ± 38, 40, 65, 75, 110,131, 134 19 Np^2 ± 28,54,62,68,69,99,116,127

Is there a p for which f(p^n) = f(p) for any n?
If not, how far can we go?

What about the thirds in base ten?

• f(3)=1
• f(3^2)=1 = f(3)
• f(3^3)=3 = 3f(3)
• f(3^4)=9 =3^2f(3) or 3f(3^3)
• so here f(3^n) = 3^(n-2)f(3)

and extending this ...

or how about base 82? (3^4+1)
f(3) = f(3^2) = f(3^3) = f(3^4) = 1

but this still doesn't tell me why 487 is an exception.

all comments welcome - and for reference see the page of results so far

Results

And a fascinating book for Number Theory work:
Recreations in the Theory of Number, Beiler (Dover Books 1966)