Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was reading the Wikipedia article on senary numbers (base 6), which states that:

all primes, when expressed in base-six, other than 2 and 3 have 1 or 5 as the final digit

Unless I am converting to senary incorrectly, I find this not to be true. For example, the senary representation of the decimal number 2047 is '13251', which would be a prime according to the stated rule, but is not (2047 = 89 * 23).

Is my conversion correct? Is the stated rule incorrect?

share|cite|improve this question
I think the statement says that all primes other than $2$ or $3$ have $1$ or $5$ as the final digit, not that all numbers that have $1$ or $5$ in base $6$ as the final digit are primes. So I believe your example shows that the converse is not true, but this is not the same as saying the statement is not true. – yunone Mar 19 '11 at 0:19
In other words some non-primes may also end in 1 or 5... Ahhh. Too obvious to see. Thanks... Secondary question, then: does anyone know if numbers in base 6 which end and 1 or 5 that are not primes have anything in common? – Benjamin Mar 19 '11 at 0:24
What they all have in common is that they are not divisible by $2$ or $3$. There isn't much else to be said, because having a base $6$ expansion that ends in $1$ or $5$ is equivalent to not being divisible by $2$ or $3$ – Jonas Meyer Mar 19 '11 at 0:29
In particular, the smallest example is $5^2=41_6$, and the next smallest is $5\cdot 7=55_6$. – Jonas Meyer Mar 19 '11 at 0:39
I don't think this question should be closed. It contains two pieces of interest to mathematicians: senary numbers and mathematical logic (misunderstanding $\,A\implies B\,$ as meaning (that also) $\,B\implies A\,$ ) – DonAntonio May 16 '13 at 12:01
up vote 12 down vote accepted

You are misinterpreting the statement. "All primes satisfy property $X$" means "If $p$ is prime, then $p$ has property $X$." You have instead interpreted it as "If $p$ has property $X$, then $p$ is prime."

The statement is true, because if $p$ is a prime greater than $3$, then $p$ is not divisible by $2$ or $3$, whereas a number whose base six expansion ends in $0$, $2$, or $4$ is even and a number whose base six expansion ends in $0$ or $3$ is a multiple of $3$.

share|cite|improve this answer

As said, you have misread the statement. This is a special case of the fact that for an odd prime $\rm\:p\:,\:$ $\rm\: \phi(2\:p)\ =\ \phi(p)\ =\ p-1\:,\ $ i.e. there are $\rm\: p-1\: $ naturals below $\rm\:2\:p\:$ that are coprime to $\rm\:2\:p\:,\:$ namely all $\rm\:p\:$ odd numbers below $\rm\:2\:p\ $ excepting $\rm\:p\:.\ $ Hence, modulo $\rm\:2\:p\:,\:$ an odd prime $\rm\ne p\:$ must lie in one of these congruence classes (else it has a nontrivial gcd with $\rm\:2\:p\:,\:$ so it is composite). $\:$ Hence if $\rm\:q\:$ is prime then $\rm\ q\equiv 1,5\ \ (mod\ 6)\:;\ \ q\equiv 1,3,7,9\ \ (mod\ 10)\:;\ \ q\equiv 1,3,5,9,11,13\ \ (mod\ 14)\ $ etc, assuming that $\rm\:q\:$ is coprime to the modulus. Exploiting reflection symmetry we can state this more succinctly: $\rm\ \ q\equiv \pm 1\ \ (mod\ 6)\:;\ \ q\equiv \pm\{1,3\}\ \ (mod\ 10)\:;\ \ q\equiv\pm \{1,3,5\}\ \ (mod\ 14)\ $ and, more generally, $\rm\:\ \ \ q\equiv \pm\{1,3,5,\cdots,p-2\}\ \ (mod\ 2\:p)\ $

share|cite|improve this answer

The relationship in the quote is a subset. All primes in base 6, other than 2 and 3, is a subset of all numbers ending in 1, 5. There are composite numbers that end in the same digits, since all numbers coprime to six end in 1,5 base 6.

41 = dec 25 = 5*5 , and 205 = 11 * 15 = dec 77 evidently are not primes, but are co-prime to 6.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.