Problems & Puzzles: Puzzles

Puzzle 1186  A puzzle from Emmanuel Vantieghem.

Emmanuel Vantieghem sent the following nice puzzle:

A few days ago I was wondering if I could find two positive numbers  a  and  b  and a number  n > 1 such that the numbers
a p(n + i) - b p(n + i + 1), (p(i)  being the  ith prime)
all are prime for  i = 0, 1, 2, ,..., k, with  k  as big as possible.

My best result was : a = 10, b = 9  and  n = 17 :
     a 59 - b 61 = 41
     a 61 - b 67 = 7
     a 67 - b 71 = 31
     a 71 - b 73 = 53
     a 73 - b 79 = 19
     a 79 - b 83 = 43
     a 83 - b 89 = 29
     a 89 - b 97 = 17
     a 97 - b 101 = 61
     a 101 - b 103 = 83
     a 103 - b 107 = 67
     a 107 - b 109 = 89
     a 113 - b 127 = 73.
Observe that  a 53 - b 59 = -1  and  a 127 - b 131 = -13.
 

The last number was recognized by Mathematica© as prime.  Therefore I went a bit further with "negative primes".

Then I found a chain with  25  "primes" : a = 21, b = 20, n = 23 :
     a 83 - b 89 = -37
     a 89 - b 97 = -71
     a 97 - b 101 = 17
     a 101 - b 103 = 61
     a 103 - b 107 = 23
     a 107 - b 109 = 67
     a 109 - b 113 = 29
     a 113 - b 127 = -167
     a 127 - b 131 = 47
     a 131 - b 137 = 11
     a 137 - b 139 = 97
     a 139 - b 149 = -61
     a 149 - b 151 = 109
     a 151 - b 157 = 31
     a 157 - b 163 = 37
     a 163 - b 167 = 83
     a 167 - b 173 = 47
     a 173 - b 179 = 53
     a 179 - b 181 = 139
     a 181 - b 191 = -19
     a 191 - b 193 = 151
     a 193 - b 197 = 113
     a 197 - b 199 = 157
     a 199 - b 211 = -41
     a 211 - b 223 = -29
(a 79 - b 83 = -1  and  223 - b 227 = 143 = 11*13, composite).

BTW, as you can observe, primes need not to be strictly distinct.
 

Q. Can you find longer chains ?


From 24 to 30 August, 2024, contributions came from Michael Branicky, Simon Cavegn, Emmanuel Vantieghem, JM Rebert, Oscar Volpatti

***

Michael wrote:

For proper prime numbers (no negatives allowed), I found two longer chains as follows.

 
I found a chain with 16 primes using a = 21, b = 20, n = 33
   a 269 - b 271 = 229
   a 271 - b 277 = 151
   a 277 - b 281 = 197
   a 281 - b 283 = 241
   a 283 - b 293 = 83
   a 293 - b 307 = 13
   a 307 - b 311 = 227
   a 311 - b 313 = 271
   a 313 - b 317 = 233
   a 317 - b 331 = 37
   a 331 - b 337 = 211
   a 337 - b 347 = 137
   a 347 - b 349 = 307
   a 349 - b 353 = 269
   a 353 - b 359 = 233
   a 359 - b 367 = 199
a 263 - b 269 = 143 composite
a 367 - b 373 = 247 composite

I found a chain with 17 primes using a = 22, b = 15, n = 33
   a 11 - b 13 = 47
   a 13 - b 17 = 31
   a 17 - b 19 = 89
   a 19 - b 23 = 73
   a 23 - b 29 = 71
   a 29 - b 31 = 173
   a 31 - b 37 = 127
   a 37 - b 41 = 199
   a 41 - b 43 = 257
   a 43 - b 47 = 241
   a 47 - b 53 = 239
   a 53 - b 59 = 281
   a 59 - b 61 = 383
   a 61 - b 67 = 337
   a 67 - b 71 = 409
   a 71 - b 73 = 467
   a 73 - b 79 = 421
a 7 - b 11 = -11 negative
a 79 - b 83 = 493 composite
 

 
For "primes" (negative allowed), I also found two longer chains as follows.

 
I found a chain with 28 "primes" using a = 476, b = 465, n = 33
   a 137 - b 139 = 577
   a 139 - b 149 = -3121
   a 149 - b 151 = 709
   a 151 - b 157 = -1129
   a 157 - b 163 = -1063
   a 163 - b 167 = -67
   a 167 - b 173 = -953
   a 173 - b 179 = -887
   a 179 - b 181 = 1039
   a 181 - b 191 = -2659
   a 191 - b 193 = 1171
   a 193 - b 197 = 263
   a 197 - b 199 = 1237
   a 199 - b 211 = -3391
   a 211 - b 223 = -3259
   a 223 - b 227 = 593
   a 227 - b 229 = 1567
   a 229 - b 233 = 659
   a 233 - b 239 = -227
   a 239 - b 241 = 1699
   a 241 - b 251 = -1999
   a 251 - b 257 = -29
   a 257 - b 263 = 37
   a 263 - b 269 = 103
   a 269 - b 271 = 2029
   a 271 - b 277 = 191
   a 277 - b 281 = 1187
   a 281 - b 283 = 2161
a 131 - b 137 = -1349 composite
a 283 - b 293 = -1537 composite
 

 
I found a chain with 31 "primes" using a = 1026, b = 1015, n = 33
   a 397 - b 401 = 307
   a 401 - b 409 = -3709
   a 409 - b 419 = -5651
   a 419 - b 421 = 2579
   a 421 - b 431 = -5519
   a 431 - b 433 = 2711
   a 433 - b 439 = -1327
   a 439 - b 443 = 769
   a 443 - b 449 = -1217
   a 449 - b 457 = -3181
   a 457 - b 461 = 967
   a 461 - b 463 = 3041
   a 463 - b 467 = 1033
   a 467 - b 479 = -7043
   a 479 - b 487 = -2851
   a 487 - b 491 = 1297
   a 491 - b 499 = -2719
   a 499 - b 503 = 1429
   a 503 - b 509 = -557
   a 509 - b 521 = -6581
   a 521 - b 523 = 3701
   a 523 - b 541 = -12517
   a 541 - b 547 = -139
   a 547 - b 557 = -4133
   a 557 - b 563 = 37
   a 563 - b 569 = 103
   a 569 - b 571 = 4229
   a 571 - b 577 = 191
   a 577 - b 587 = -3803
   a 587 - b 593 = 367
   a 593 - b 599 = 433
a 389 - b 397 = -3841 composite
a 599 - b 601 = 4559 composite

 
I found a chain with 31 "primes" using a = 1026, b = 1015, n = 33
 
   a 397 - b 401 = 307
   a 401 - b 409 = -3709
   a 409 - b 419 = -5651
   a 419 - b 421 = 2579
   a 421 - b 431 = -5519
   a 431 - b 433 = 2711
   a 433 - b 439 = -1327
   a 439 - b 443 = 769
   a 443 - b 449 = -1217
   a 449 - b 457 = -3181
   a 457 - b 461 = 967
   a 461 - b 463 = 3041
   a 463 - b 467 = 1033
   a 467 - b 479 = -7043
   a 479 - b 487 = -2851
   a 487 - b 491 = 1297
   a 491 - b 499 = -2719
   a 499 - b 503 = 1429
   a 503 - b 509 = -557
   a 509 - b 521 = -6581
   a 521 - b 523 = 3701
   a 523 - b 541 = -12517
   a 541 - b 547 = -139
   a 547 - b 557 = -4133
   a 557 - b 563 = 37
   a 563 - b 569 = 103
   a 569 - b 571 = 4229
   a 571 - b 577 = 191
   a 577 - b 587 = -3803
   a 587 - b 593 = 367
   a 593 - b 599 = 433
a 389 - b 397 = -3841 composite
a 599 - b 601 = 4559 composite

 

***

Simon wrote:

Chain with 31 "primes":
a=1026, b=1015, n=78
1   a 397 - b 401 = 307
2   a 401 - b 409 = -3709
3   a 409 - b 419 = -5651
4   a 419 - b 421 = 2579
5   a 421 - b 431 = -5519
6   a 431 - b 433 = 2711
7   a 433 - b 439 = -1327
8   a 439 - b 443 = 769
9   a 443 - b 449 = -1217
10   a 449 - b 457 = -3181
11   a 457 - b 461 = 967
12   a 461 - b 463 = 3041
13   a 463 - b 467 = 1033
14   a 467 - b 479 = -7043
15   a 479 - b 487 = -2851
16   a 487 - b 491 = 1297
17   a 491 - b 499 = -2719
18   a 499 - b 503 = 1429
19   a 503 - b 509 = -557
20   a 509 - b 521 = -6581
21   a 521 - b 523 = 3701
22   a 523 - b 541 = -12517
23   a 541 - b 547 = -139
24   a 547 - b 557 = -4133
25   a 557 - b 563 = 37
26   a 563 - b 569 = 103
27   a 569 - b 571 = 4229
28   a 571 - b 577 = 191
29   a 577 - b 587 = -3803
30   a 587 - b 593 = 367
31   a 593 - b 599 = 433


Additional result:
Changing the +1 in the formula to +8 finds a chain of 51 "primes":
Formula: a p(n + i) - b p(n + i + 8)
a=15, b=14, n=121
1   a 619 - b 673 = -137
2   a 631 - b 677 = -13
3   a 641 - b 683 = 53
4   a 643 - b 691 = -29
5   a 647 - b 701 = -109
6   a 653 - b 709 = -131
7   a 659 - b 719 = -181
8   a 661 - b 727 = -263
9   a 673 - b 733 = -167
10   a 677 - b 739 = -191
11   a 683 - b 743 = -157
12   a 691 - b 751 = -149
13   a 701 - b 757 = -83
14   a 709 - b 761 = -19
15   a 719 - b 769 = 19
16   a 727 - b 773 = 83
17   a 733 - b 787 = -23
18   a 739 - b 797 = -73
19   a 743 - b 809 = -181
20   a 751 - b 811 = -89
21   a 757 - b 821 = -139
22   a 761 - b 823 = -107
23   a 769 - b 827 = -43
24   a 773 - b 829 = -11
25   a 787 - b 839 = 59
26   a 797 - b 853 = 13
27   a 809 - b 857 = 137
28   a 811 - b 859 = 139
29   a 821 - b 863 = 233
30   a 823 - b 877 = 67
31   a 827 - b 881 = 71
32   a 829 - b 883 = 73
33   a 839 - b 887 = 167
34   a 853 - b 907 = 97
35   a 857 - b 911 = 101
36   a 859 - b 919 = 19
37   a 863 - b 929 = -61
38   a 877 - b 937 = 37
39   a 881 - b 941 = 41
40   a 883 - b 947 = -13
41   a 887 - b 953 = -37
42   a 907 - b 967 = 67
43   a 911 - b 971 = 71
44   a 919 - b 977 = 107
45   a 929 - b 983 = 173
46   a 937 - b 991 = 181
47   a 941 - b 997 = 157
48   a 947 - b 1009 = 79
49   a 953 - b 1013 = 113
50   a 967 - b 1019 = 239
51   a 971 - b 1021 = 271

***

Emmanuel wrote:

These are my best results :
In case only positive numbers can be prime :
a = 6951; b = 6910;
U = (3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851,
3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919);
V = (3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853,
3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923);

a U - b V = (111347,111593,1279,112741,140627,85429,58199,127873,114217,31543,142841,87643,60413,130087,
144071,88873,61643,131317,103841,35069,132547,118891,146777,133039),
24 different primes

In case negative numbers may be considered as prime :
a = 1026; b = 1015;
U = (397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,
547,557,563,569,571,577,587,593);
V = (401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,
563,569,571,577,587,593,599);
a U - b V = (307,-3709,-5651,2579,-5519,2711,-1327,769,-1217,-3181,967,3041,1033,-7043,-2851,1297,-2719,1429,-557,-6581,3701,-12517,-139,-4133,37,103,4229,191,-3803,367,433);
31 numbers whose absolute value gives different primes.

 

***

JM Rebert wrote:

I found a chain with 31 primes with (a = 1026, b = 1015, n = 78) :
     0:    397 a -    401 b =    307
     1:    401 a -    409 b =  -3709
     2:    409 a -    419 b =  -5651
     3:    419 a -    421 b =   2579
     4:    421 a -    431 b =  -5519
     5:    431 a -    433 b =   2711
     6:    433 a -    439 b =  -1327
     7:    439 a -    443 b =    769
     8:    443 a -    449 b =  -1217
     9:    449 a -    457 b =  -3181
    10:    457 a -    461 b =    967
    11:    461 a -    463 b =   3041
    12:    463 a -    467 b =   1033
    13:    467 a -    479 b =  -7043
    14:    479 a -    487 b =  -2851
    15:    487 a -    491 b =   1297
    16:    491 a -    499 b =  -2719
    17:    499 a -    503 b =   1429
    18:    503 a -    509 b =   -557
    19:    509 a -    521 b =  -6581
    20:    521 a -    523 b =   3701
    21:    523 a -    541 b = -12517
    22:    541 a -    547 b =   -139
    23:    547 a -    557 b =  -4133
    24:    557 a -    563 b =     37
    25:    563 a -    569 b =    103
    26:    569 a -    571 b =   4229
    27:    571 a -    577 b =    191
    28:    577 a -    587 b =  -3803
    29:    587 a -    593 b =    367
    30:    593 a -    599 b =    433

 

***

Oscar wrote:

I found some slightly longer chains, I'm sending only two champions for each version of the problem.  
Using Vantieghem's notation, a chain has length k+1, because index i goes from 0 to k.

 
Positive primes.
k+1, a, b, n;
20, 3135, 1882, 10;
24, 6951, 6910, 520.
In both cases, primes are also distinct.

 
Signed primes.
k+1, a, b, n;
28, 476, 465, 33;
31, 1026, 1015, 78.
In both cases, primes also have distinct absolute values.

 
Negative primes.
Inequality a>b holds for Vantieghem's examples and for my previous champions.
If a < b, the chain only contains negative numbers.
Finding consecutive primes seems harder in this case.
k+1, a, b, n;
17, 705, 728, 57;
18, 6699, 7174, 16.
In both cases, primes also have distinct absolute values.

 

***

Records   |  Conjectures  |  Problems  |  Puzzles