# Comments on the 487 problem

## Steve Jacobs

I have spent some time studying these numbers, and have found some patterns that you might find interesting. Starting on the "results" page, there is a list with columns "base" and "primes" that associate primes with a particular base. These numbers have the following relationship: if p is from the "prime" column and b is from the "base" column, then p^2 is a strong pseudoprime to base b. Although I don't have a mathematical proof, it appears that whenever any power of a prime is a pseudoprime to some base b, it is also a strong pseudoprime and it satisfies b^(p-1) == 1 (mod p^a).

I've also found that when p^a is a strong pseudoprime to base b, it is possible to generate a strong pseudoprime to base p^(a+1) by using the following formula:

(b^p) == c (mod p^(a+1))

where p^(a+1) is a strong pseudoprime to base c. This formula can be repeated to generate a series of bases for arbitrarily higher powers of prime p. What's more, if these bases are written as "radix p" numbers, then an interesting pattern emerges. For example, using p=5 and starting with base b=2, we get the following sequences of bases and powers of 5

2252^4 == 1 (mod 5)
7125^27^4 == 1 (mod 5^2)
572125^357^4 == 1 (mod 5^3)
18212125^4182^4 == 1 (mod 5^4)
2057312125^52057^4 == 1 (mod 5^5)
145574312125^6
4580724312125^7

As you can see, when the bases are written as radix-p numbers, the next base in the list simply adds a new more significant digit to the previous base. This helps to explain why each base tends to have only a small number of prime powers associated with it, since generating the base for a higher power of p can only give a new base that is the same or larger than the previous base.

Here are a few bases for higher powers of 487. I've separated the radix-487 "digits" with a -