Problems & Puzzles: Puzzles

Puzzle 987. Another puzzle related to the year 2020

Emmanuel Vantieghem sent the following very interesting puzzle:

Let  P  be the sequence of all primes with prime digits :
P = { 2, 3, 5, 7, 23, 37, 53, 73, 223, 227, 233, 257, 277, 337, 353, 373, 523, 557, 577, ... } ( A019546 at the OEIS).

Consider then the set  DP  of all numbers that can be written as the difference of two members of  P.

For convenience, the members of  DP  will be called  DP-numbers.

On the occasion of puzzle 984, I noticed that 2020 is a DP-number: 2020 = 2357 - 337

The first questions that came to my mind were

 Q1.  What is the next year number which is a DP-number ?

 Q2.  What is the previous year number which is a DP-number ?
 
Since almost all elements of  P  end in 3 or 7, it is clear that most DP numbers will end in 0, 4 or 6. But, of course, DP-numbers also may end in  1, 2, ... So, we ask:

Q3. What are the previous/next year numbers which end in  n = 0, 1, 2,...  that are  DP-numbers? *
  
Q4. Can you find a number with end digit  0, 4  or 6  That is NOT a DP-number ?
 
Q5. In case you think there is a negative answer to Q4, can you give your greatest DP-number with end digit  0, 4, or 6?
(for instance, my greatest  n  such that  10^n  is a DP-number is  827)


During the week Jan 26-31, 2020, contributions came from Carlos Rivera, Oscar Volpatti and Emmanuel Vantieghem

***

Carlos Rivera wrote:

For Q1 and Q2:

Previous to 2020: 2016=2273-257

Next to 2020: 2024=2377-353

For Q3:

Ending digit Previous & After 2020
0 2010 = 2237 - 227 2030 = 5557-3527
1 771 = 773 -2 2271 = 2273 - 2
2 752 = 757 - 5 2232 = 2237 - 5
3 3 = 5-2 None
4 2014 = 2237 - 223 2024 = 2377 - 353
5 755 = 757 - 2 2235 = - 2
6 2016 = 2273 - 257 2026 = 2753 - 727
7 None None
8 768 = 773 - 5 2268 = 2273 -5
9 None None

For Q4: I believe that there are always solutions for years ending in 0, 4 or 6. But I have not a proof.

For Q5 I got this one:

10^1110=P-Q

P=3222222222222222222222222222222222222222222222222222222222222222222222222222222
 

22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
222222222222222222222222222222222222222222222222222222222222222523377323

Q=2222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
22222222222222222222222222222222222222222222222222222222222222222222222222222222
222222222222222222222222222222222222222222222222222222222222222523377323

***

Oscar wrote:

The integer 2020 is an interesting DP-number.
It can be written as a difference of primes using only two prime digits: 
2020 = 7577-5557.
There are many such solutions (possibly, infinitely many); we can partition them into four families:
  
2020 = (T*10000+5353) - (T*10000+3333)
T in {3335335,55355335,335353333,353555335,533355535,535533355,553335553,...}
  
2020 = (T*10000+5553) - (T*10000+3533)
T in {335,35555,355553,535355,3333335,3355553,33533555,53333555,55355333,...}

 
2020 = (T*10000+7577) - (T*10000+5557)
T in {0,575757,7757775,55755777,55757757,55775775,57577575,57577755,...}
  
2020 = (T*10000+7777) - (T*10000+5757)
T in {5575,57775,7775557,57755557,77557555,77577757,5555575777,5557557757,...}

 
About Q1,Q2,Q3.
Previous DP-year for each congruence class mod 10.
0: 2010 = 2237-227 = 5333-3323;
1:  771 = 773-2;
2:  752 = 757-5;
3:    3 = 5-2;
4: 2014 = 2237-223;
5:  755 = 757-2;
6: 2016 = 2273-257 (closest to 2020);
7:   -3 = 2-5;
8:  768 = 773-5;
9:   -1 = 2-3.

 
Next DP-year for each congruence class mod 10.
0: 2030 = 5557-3527 = 75553-73523;
1: 2271 = 2273-2;
2: 2232 = 2237-5;
3: none;
4: 2024 = 2377-353 (closest to 2020);
5: 2235 = 2237-2;
6: 2026 = 2753-727;
7: none;
8: 2268 = 2273-5;
9: none.

 
About Q4.
I think that every number ending in 0,4 or 6 is a DP-number.
Consider the prime digits 2,3,5,7, and compute the 16 possible differences.
There is at least one element for each congruence class mod 10:
0: 2-2, 3-3, 5-5, 7-7;
1: 3-2;
2: 5-3, 7-5;
3: 5-2;
4: 7-3;
5: 2-7, 7-2;
6: 3-7;
7: 2-5;
8: 3-5, 5-7;
9: 2-3.

 
So, we can prove the following lemma by induction on n:
given a positive number N, composed of n digits and ending with 0, 4 or 6,
we can find two positive numbers A and B, composed of n prime digits and ending with 3 or 7,
such that N == A-B mod 10.
As an example, for N = 2020 there are 32 possible pairs (A,B).

 
If A >= B, then N = A-B.
If A < B, then N = A-B+10^n = (A+3*10^n) - (B+2*10^n);
in this case, replace A with A+3*10^n, B with B+2*10^n, n with n+1.

 
Define the numbers X = (A+T*10^n), Y = (B+T*10^n):
equality N = X-Y holds for every choice of the prefix T.

 
Can we choose a non-negative prime-digit prefix T such that X and Y are both prime?
By construction, A and B are coprime with 10 (otherwise, the answer would be no).
I conjecture that the number of candidates T within an interval [10^(m-1),10^m]
grows as C*(4^m)/((n+m)^2), for some constant C.
Therefore, my optimistic answer is: yes, in infinitely many ways, for every N ending in 0, 4 or 6.

 
About Q5.
We need to identify two large prime-digit primes L3 (ending with 3) and L7 (ending with 7).
Then L3-7, L7-3, and max(L3-3,L7-7) are large DP-numbers ending with 6, 4, and 0.
I searched among near-repdigits, using only digits 3 and 7.
Let R(k) be the repunit with length k.

 
Largest proven primes:
7*R(2720) - 4,
3*R(2968) + 4.
 
More PRPs ending with 3:
3*R(3108) + 40 (apr-cl primality proof in progress),
7*R(4494) - 4,
3*R(5780) + 40.
More PRPs ending with 7:
3*R(3642) + 4 (apr-cl primality proof in progress),
3*R(4827) + 4,
3*R(4918) + 4,
3*R(5592) + 4,
3*R(5706) + 4.
 

***

Emmanuel wrote:

For the first three question, a small list of  P-primes (say < 10000) is needed (and sufficient). 

Q1
Next DP-year is  2024 = 2377 - 353.
-> 2021  is not a DP-year : The end digit  1  can only come from the difference of a P-prime ending in 3 minus 2.
     The nearest such year numbers are  771 = 773 - 2  and, 2271 = 2273 - 2 (which answers  Q3).
-> 2022  is not a  DP-year : The end digit  2  can only come from the difference of a P-prime ending in 7 minus 5.
     The nearest such year numbers are  752 = 757 - 5  and  2232 = 2237 - 5 (which answers  Q3).
-> 2023  is not a  DP-year : The end digit  3  can only come from  5 - 2.

Q2:
Previous DP-year is  2016 = 2273 - 257.
-> 2017  is not a DP-year : The end digit  7  cannot come from the difference of two P-primes.
-> 2018  is not a  DP-year : The end digit  8  can only come from the difference of a P-prime ending in 3 minus 5.
     The nearest such year numbers are  768 = 773 - 5  and  2268 = 2273 - 5 (which answers  Q3)
-> 2019  is not a  DP-year : The end digit  9  cannot come from the difference of two P-primes.

Q3
End digit 4 : next year number is  2024, the previous is  2014 = 2237 - 223
End digit  5  can only come from the difference of a P-prime ending in 7  and 2.
The nearest such numbers are 755 =757 - 2  and  2235 = 2237 - 2.
End digit 6 : previous is 2016, next is 2026 = 2756 - 727.

Q4
I conjecture that every number ending in  0, 4  or 6  is a DP-number.
But I think a proof is far away ...

Q5
The actually greatest DP-number is  p - 2, where  p is the 82000 digit number
(10^40950+1) * (10^20055+1) * (10^10374 + 1) * (10^4955 + 1) * (10^2507 + 1) * (10^1261 + 1) * (3*R(1898) + 555531001*10^940 - R(958)) + 1,
found and proved prime by David Broadhurst (see the link in the OEIS sequence  A019546. ( R(n)  is the repunit with  n  digits).
Less smaller (but in accordance with the title of this puzzle) is the Dp-number 10^2020 = q - p,
where p = 2000000000000*R(2009) + 322525275777  and  q = p + 10^2020.
The primality of  p  and  q  is proved by PRIMO (in about 5,5 hours for each).

***

Records   |  Conjectures  |  Problems  |  Puzzles