Problems & Puzzles:
Here we ask to find pair of primes p&q such
that the sum of the integers in between p and q (including p and
q) is equal to p&q (q appended to the right of p).
As far as I know these are the only two
Q1. Find more
pairs of these primes.
BTW, it may be demonstrated that:
1(3)n+...+5(3)n = 1(3)n5(3)n, for n=>1
Q2. Find a n>1 value
such that both 1(3)n and 5(3)n are primes; or show that no both
can be primes at the same time for n>1.
Contributions came from Carlos Rivera, Claudio Meller & Emmanuel
I tried to find
prime solutions to the complementary equation S(p,q)=q&p. I
find one single solution, but I found two infinite non-prime family
a) p=5(3)n2, q=21(3)n2, S(p,q)=21(3)n25(3)n2
b) p=6(2)n, q=21(7)n,
S(p,q) = (q^2 + q - p^2 + p) / 2
and pq = 10^n p + q (where n = number of digits of q )
So (q^2 + q - p^2 + p) / 2 = 10^n p + q
Then q^2 - q = (2*10^n - 1) p + p^2
Seeking positive solutions in Wolfram I didnīt found cases where x
and y are prime except those you mention (I do not give solutions
for n> 6 because it takes much time)
The numbers of form 1333 .... and 5333 ... (with the same length(
are always solutions, I seek this numbers (until 246 digits) but I
couldnīt find two primes
A curiosity : S(13,1613) = 13 +14 + ... +11612 +1613 = 1301613
Q1. I found no more pairs of such primes.
Q2. If 1(3)n and 5(3)n are prime,
then n must be odd and bigger than 22002
(this took a lot of time ...)
However, it is not difficult to prove that,
to solve Q1, it suffices to solve Q2.
Indeed, if A and B are primes such that S(A,B) = A&B, then :
either A = 2 and B = 7
or A = 1(3)m and B = 5(3)m for
some natural number m.
Here is an outline of the proof (I ommitted
many details) :
We have : S(A,B) = (A+B)(B-A+1)/2 and A&B
where k is the number of digits of B.
Thus, S(A,B) = A&B implies (after some
B(B - 1) = A(A+D), where D = 2*10^k -
If A and B are both prime, then :
B - 1 = n*A (1)
A+D = n*B (2)
for some natural number n > 1.
Looking closely at the number of digits
of A, B and n,
it is not difficult to obtain
from (1) and (2) that
n has at most two digits and
that A has at least k - 2 digits.
Eliminating B from the
equations (1) and (2) gives :
(n^2 - 1)A = 2*10^k - (n+1).
This immediately implies that n+1 should
which reduces the possible values
for n to
It is then not hard to prove that the only
values of n for which the quotient
(2*10^n - n - 1)/(n^2 - 1)
is an integer are :
1) n = 3 when k = 1, A = 2 and
2) n = 4, k>=2, A= 1(3)(k-1) (and hence,
B = 5(3)(k-1)),
I found lots of solutions of the
equation S(A,B) = A&B. Among them are the infinite
families A = 35(63)n, B =91(63)n and A = 1(7)n8, B =