Problems & Puzzles: Puzzles

Puzzle 162. P2 + Q2 = p2 +q2 

Jean Claude Rosa poses the following puzzle:

Find solutions to P2 + Q2 = p2 +q2

  • p & P is a reversible pair
  • q & Q is a reversible pair
  • p, q, P & Q are primes

The first four solutions found by J. C. Rosa are:

  • 102061^2 + 335113^2 = 160201^2 +311533^2
  • 1140431^2 + 1466821^2 =1340411^2 +1286641^2
  • 1562293^2+3935951^2=3922651^2+1595393^2
  • 3085063^2+9758759^2=3605803^2+9578579^2

1. Can you find six more solutions?

Relaxing the primality condition he also has found some curios patterns:

                             17^2+84^2=71^2+48^2
                         107^2+804^2=701^2+408^2
                      1007^2+8004^2=7001^2+4008^2
                   10007^2+80004^2=70001^2+40008^2
               100007^2+800004^2=700001^2+400008^2
            1000007^2+8000004^2=7000001^2+4000008^2
         10000007^2+80000004^2=70000001^2+40000008^2
     100000007^2+800000004^2=700000001^2+400000008^2
  1000000007^2+8000000004^2=7000000001^2+4000000008^2

 

and:

                              79^2+62^2=97^2+26^2
                          709^2+602^2=907^2+206^2
                     7009^2+6002^2=9007^2+2006^2
                    70009^2+60002^2=90007^2+20006^2

(numbers in bold letter are prime numbers)

2. Can you find a pattern like these shown above but using only odd numbers, none of which are ending in "5" neither are divided by "3" (satisfying these conditions it may happen that one equation member of the pattern could have prime all the four numbers )?


Solution:

Jud McCranie sent the following 3 more solutions:

15697673 37784951 37679651 15948773
11012041 32223013 14021011 31032223
10203031 33054023 13030201 32045033

***

Bingo!... J.C. Rosa discovered that the third example gotten by Jud is the second member of one patter as the asked in the question 2:

  a)                                           1031^2+3543^2=1301^2+3453^2 
  b)                             10203031^2+33054023^2=13030201^2+32045033^2
  c)               102020303031^2+330305402023^2=130303020201^2+320204503033^2
  d) 1020202030303031^2+3303030540202023^2=1303030302020201^2+3202020450303033^2

(primes are in blue)

Does this pattern has another case with all the four members primes?

One day later, J.C. Rosa discovered that the first example found by Jud is also a member of another pattern:

 
                           156673^2+377951^2=376651^2+159773^2
                    15697673^2+37784951^2=37679651^2+15948773^2
             1569797673^2+3778484951^2=3767979651^2+1594848773^2
      156979797673^2+377848484951^2=376797979651^2+159484848773^2
 

Does this mean that all the prime-solutions are members of certain patterns?

***

 

Faride FiroozBakht found other interesting examples:

14^2+87^2=41^2+78^2
104^2+807^2=401^2+708^2
1004^2+8007^2=4001^2+7008^2
10004^2+80007^2=40001^2+70008^2
...

27^2+96^2=72^2+69^2
207^2+906^2=702^2+609^2
2007^2+9006^2=7002^2+6009^2
20007^2+90006^2=7000^2+60009^2
...

4^2+53^2=40^2+35^2
4^2+503^2=400^2+305^2
4^2+5003^2=4000^2+3005^2
4^2+50003^2=40000^2+30005^2
...

3^2+54^2=30^2+45^2
3^2+504^2=300^2+405^2
3^2+5004^2=3000^2+4005^2
3^2+50004^2=30000^2+40005^2

***

More solutions for Q.2 came from Jon Wharf (5/1/2003)

question 2 asks for readily extensible pairs (plus reverses) with a potential to produce prime numbers.

One example is:

303949^2 + 959333^2 = 949303^2 + 333959^2
3030949^2 + 9590333^2 = 9490303^2 + 3330959^2
30300949^2 + 95900333^2 = 94900303^2 + 33300959^2
303000949^2 + 959000333^2 = 949000303^2 + 333000959^2

How did I look for them?

For such a LH pair of numbers with 2n digits a & b, break down into n digit numbers as follows: a=w*10^n+x and b=y*10^n+z

Now w,x,y,z must fulfill the following [rev() is the digit reverse]:

1. for the coprime-to-30 condition:

a) rev(w), x, rev(y), z all <> 0 mod 2 and <> 0 mod 5;
b) w+x and y+z <>0 mod 3

2. for the zero-inflatable reverse-sum-square equal, we want (w*k+x)^2 + (y*k+z)^2 = (rev(x)*k+rev(w))^2 + (rev(z)*k+rev(y))^2 k=10^m, m>=n, and collecting like powers of k we get

a) w^2+y^2 = rev(x)^2+rev(z)^2
b) w*x+y*z = rev(x)*rev(w)+rev(z)*rev(y)
c) x^2+z^2 = rev(w)^2+rev(y)^2

Without loss of generality, I also set w < rev(x) < y . This ensures rev(z) > w also.

So I trawled through the combinations of w, x, y and saw if the resulting z was any good - geting two extensible pairs for six digits and another 37 for eight digits.

Six digit pairs and reverses:

111373, 383141, 373111, 141383
303949, 959333, 949303, 333959 *

Eight digit pairs and reverses:

10003231, 37654663, 13230001, 36645673 *
10122343, 36722561, 34322101, 16522763
10162303, 32926361, 30326101, 16362923 *
10203031, 33054023, 13030201, 32045033 *#
10221233, 35612461, 33212201, 16421653
10431043, 37913791, 34013401, 19731973
11012221, 14421431, 12221011, 13412441
11133353, 37933771, 35333111, 17733973
11240233, 35935771, 33204211, 17753953 *
11331133, 35713571, 33113311, 17531753
11430023, 34603471, 32003411, 17430643
12002641, 15620231, 14620021, 13202651
12023231, 15632641, 13232021, 14623651
12140323, 33735551, 32304121, 15553733 *
12303551, 37754563, 15530321, 36545773
12342143, 36924781, 34124321, 18742963
12584723, 33917351, 32748521, 15371933 *
12853463, 38904781, 36435821, 18740983 *
13503661, 36654353, 16630531, 35345663 *
13603561, 34354033, 16530631, 33045343 *
13662653, 36926761, 35626631, 16762963 *
13753553, 36704561, 35535731, 16540763
14471843, 34948741, 34817441, 14784943 *
14814971, 39787483, 17941841, 38478793 *
14831483, 39713971, 38413841, 17931793
15640673, 37735951, 37604651, 15953773
15803981, 36754253, 18930851, 35245763 *
30039449, 95593333, 94493003, 33339559
30102523, 38520563, 32520103, 36502583
30201413, 37410463, 31410203, 36401473
30940349, 95335933, 94304903, 33953359 *
31113533, 39731773, 33531113, 37713793
31206673, 38660423, 37660213, 32406683 *
31414243, 92487419, 34241413, 91478429 *
32136253, 37463543, 35263123, 34536473 *
32223433, 39832883, 33432223, 38823893
39040439, 93535393, 93404093, 39353539 *

Note that one of the eight digit sets (the fourth, #) is Jud McCranie's third solution.

Looking at the definition of k, some of the pairs lend themselves to overlapping the upper and lower half (ie. k=10^m, m<n), which is OK provided the digits concerned don't sum to more than 10. Unfortunately it doesn't produce any new complete prime sets.

Also I realised that increasing m by 2 (two extra zeros) doesn't change a number mod 11. So we can eliminate almost half the pairs by checking divisibility by 11 for say m=4 and 5. This reduces the 8-digit pairs to check to only 18 pairs, starred above, and only one six digit pair remains.

I also removed {10431043,37913791} - although it could still work mod 11, it will never produce primes.

So, having done that, I searched through to m=1004 - 1000 inserted zeros - using pfgw. Disappointly, there were no new quartets of primes, and only two near-misses:

3866*10^16+0423
3766*10^16+0213
3240*10^16+6683

and

3213*10^17+6253
3526*10^17+3123
3453*10^17+6473

So, although the question is answered, no more prime sets were found.

***

Jon Wharf also found more solutions to Q1:

1351324542454234661
3668164746474617353
1664324542454231531
3537164746474618663

14813932752325723934971
39789396576167569397483
17943932752325723931841
38479396576167569398793

124231111223322111135251
392791133427724331196283
152531111223322111132421
382691133427724331197293

1043112112234322112111043
3401112112234322112113401
3791145412897982145413791
1973145412897982145411973

1044111020404040201112043
3402111020404040201114401
3792441026464646201444791
1974441026464646201442973

113123333234444432333324141
361667359458888854953765153
141423333234444432333321311
351567359458888854953766163

124231133333444333331135251
392791195379848973591196283
152531133333444333331132421
382691195379848973591197293

135014425851000158524413661
366534467873000378764434353
166314425851000158524410531
353434467873000378764435663

He has explained to me his approach, and it's available to any reader on request.

***

 



Records   |  Conjectures  |  Problems  |  Puzzles