Problems & Puzzles: Puzzles

Puzzle 792. Prime numbers equal quantity of digits...

Abhiram R. Devesh sent the following nice puzzle:
This puzzle is about finding the smallest prime base 10 when represented in base n, has equal number of all possible digits of its base.
 
Examples:

Base 2 (Equal number of 0s and 1s):
(2)b10 ==> (10)b2 
(37)b10 ==>(100101)b2
 

Base 3 (Equal number of 0s, 1s and 2s):
 
(11)b10 ==>(102)b3
(19)b10 ==>(201)b3
Q. Can we find the smallest primes in higher bases?


Contributions came from Emmanuel Vantieghem and Jan van Delden

***

Emmanuel wrote:

For bases higher than 3  there are no primes that have all digits in equal quantities.
 
Let  b  be a base > 3  and let  x  be a number with
  n times digit 0
  n times digit 1
  n times digit 2
     ...
  n times digit b-1.
Then, modulo  b-1  we have :
 x = n*(0+1+2+ ... +b-1) = n*b*(b-1)/2
and this number is either divisible by b-1 or by (b-1)/2.
Thus, it is impossible for  x  to be a prime.

***

Jan wrote:

The answer is no.
 
The digits d[i] used are [0,1,...,b-1]. Suppose the number of equal digits is k.
The resulting list of digits is L= {d[i]}[k], in some order, in base b. Itís value is V = sum (d[j]*b^j,j=0..b.k-1);

We have that b = 1 mod b-1, with b-1 odd. We now have V mod (b-1) = sum (d[j],j=0..b*k-1) mod (b-1)=
k.sum(d[i],i=0..b-1) mod (b-1).
 
If the base b is even, we have b/2 is integer and one can write:
k.sum(d[i],i=0..b-1) mod (b-1)= k.b/2.(b-1) mod (b-1) = 0 mod (b-1) so b-1 is a divisor. [Empty statement if b=2].
[Collect [0,b-1] and [1,b-2] etc.]
 
If the base b is odd, we have (b-1)/2 is integer and one can write:
k.sum(d[i],i=0..b-1) mod (b-1)= k.(b-1)/2.(b-1)+(b-1)/2 mod (b-1) = (b-1)/2 mod (b-1).
[Collect [0,b-1], [1,b-1], etc. and (b-1)/2 remains]

Substitute b=2l+1 and it reads l mod (2l), so l is as a divisor. [Empty statement if l=1, hence b=3].
In the case where b=4l+1 a simpler observation would be that we have an even number of odd digits, so the sum is even, hence divisible by 2.

***

Records   |  Conjectures  |  Problems  |  Puzzles