All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Prime and Six Settlement (Posted on 2016-10-17) Difficulty: 3 of 5
Each of A, B, C, A+B*C, B+C*A and C+A*B is a prime number.

Find the possible remainders when A+B+C is divided by 6.

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution solution | Comment 3 of 4 |
Exactly one of the numbers must be even (that is, 2), so that one of each term in the totals A+B*C, B+A*C and C+A*B is even and the other odd. Therefore A+B+C includes one even and two odds, making it even, so the remainder mod 6 is even.

A, B and C are shown in increasing sequence, as order does not matter. The total, and the total mod 6 are shown to the right of each set.

All the possible even remainders do occur in the list.

2 3 5    10 4
2 3 7    12 0
2 5 7    14 2

which is sufficient to show all the remainders.  But the frequency changes drastically as the numbers get higher:

2 3 13    18 0
2 3 17    22 4
2 5 13    20 2
2 5 19    26 2
2 7 23    32 2
2 13 17    32 2
2 5 31    38 2
2 7 47    56 2
2 7 53    62 2
2 5 61    68 2
2 13 47    62 2
2 23 37    62 2
2 23 43    68 2
2 5 73    80 2
2 5 79    86 2
2 19 59    80 2
2 3 97    102 0
2 5 97    104 2
2 23 67    92 2
2 43 53    98 2
2 19 89    110 2
2 11 109    122 2
2 17 103    122 2
2 13 113    128 2
2 23 103    128 2
2 47 73    122 2
2 47 97    146 2
2 3 167    172 4
2 11 151    164 2
2 3 173    178 4
2 43 107    152 2
2 61 89    152 2
2 17 157    176 2
2 43 113    158 2
2 61 101    164 2
2 5 181    188 2
2 13 173    188 2
2 53 127    182 2
2 83 97    182 2
2 7 197    206 2
2 3 227    232 4
2 19 191    212 2
2 23 193    218 2
2 61 149    212 2
2 53 163    218 2
2 71 139    212 2
2 17 223    242 2
2 71 151    224 2
2 89 139    230 2
2 7 257    266 2
2 41 199    242 2
2 37 233    272 2
2 41 229    272 2
2 59 199    260 2
2 19 269    290 2
2 79 191    272 2
2 7 293    302 2
2 131 139    272 2
2 37 263    302 2
2 7 317    326 2
2 43 263    308 2
2 59 241    302 2
2 127 167    296 2
2 11 331    344 2
2 17 313    332 2
2 61 251    314 2
2 101 199    302 2
2 3 353    358 4
2 31 311    344 2
2 53 277    332 2
2 59 271    332 2
2 67 263    332 2
2 5 373    380 2
2 13 353    368 2
2 29 331    362 2
2 3 383    388 4
2 47 307    356 2
2 103 233    338 2
2 163 173    338 2
2 7 383    392 2
2 109 239    350 2
2 61 311    374 2
2 89 271    362 2
2 23 373    398 2
2 73 293    368 2
2 53 337    392 2
2 131 241    374 2
2 19 401    422 2
2 59 349    410 2
2 107 277    386 2
2 167 223    392 2
2 83 313    398 2
2 19 419    440 2
2 71 349    422 2
2 5 457    464 2
2 197 223    422 2
2 181 239    422 2
2 193 233    428 2
2 181 251    434 2
2 19 461    482 2
2 23 457    482 2
2 3 503    508 4
2 113 337    452 2
2 31 461    494 2
2 127 347    476 2
2 109 359    470 2
2 59 439    500 2
2 173 307    482 2
2 53 457    512 2
2 163 317    482 2
2 11 541    554 2
2 67 443    512 2
2 17 523    542 2
2 109 389    500 2
2 241 251    494 2
2 109 401    512 2
2 23 547    572 2
2 61 479    542 2
2 149 379    530 2
2 7 587    596 2
2 7 593    602 2
2 3 607    612 0
2 151 389    542 2
2 193 347    542 2
2 37 557    596 2
2 269 271    542 2
2 257 283    542 2
2 149 421    572 2
2 17 607    626 2
2 173 397    572 2
2 5 643    650 2
2 23 607    632 2
2 29 601    632 2
2 43 587    632 2
2 67 557    626 2
2 139 461    602 2
2 151 449    602 2
2 163 443    608 2
2 79 569    650 2
2 131 499    632 2
2 239 379    620 2
2 53 613    668 2
2 257 367    626 2
2 73 593    668 2
2 167 463    632 2
2 197 433    632 2
2 251 379    632 2
2 5 709    716 2
2 103 563    668 2
2 181 461    644 2
2 67 617    686 2
2 257 397    656 2
2 83 607    692 2
2 137 547    686 2
2 311 349    662 2
2 149 541    692 2
2 281 379    662 2
2 181 491    674 2
2 269 409    680 2
2 13 743    758 2
2 67 653    722 2
2 107 607    716 2
2 331 359    692 2
2 163 557    722 2
2 7 773    782 2
2 7 797    806 2
2 199 509    710 2
2 5 811    818 2
2 331 389    722 2
2 29 769    800 2
2 31 761    794 2
2 103 653    758 2
2 197 547    746 2
2 101 661    764 2
2 79 701    782 2

The total ordinal positions of primes used was limited to 150 (for example, if all were the same prime it would be the 50th prime).

All the remainders from division by 6 were even (0, 2 or 4). The 4's get sparser later on, and the 0's get sparse very quickly.

DefDbl A-Z
Dim  crlf$


Private Sub Form_Load()
 Text1.Text = ""
 crlf$ = Chr(13) + Chr(10)
 Form1.Visible = True
 For t = 3 To 150
   For ao = 1 To t / 3
     a = prm(ao)
   For bo = ao To (t - a) / 2
     b = prm(bo)
     co = t - ao - bo
     c = prm(co)
     a1 = a + b * c
     If prmdiv(a1) = a1 Then
        b1 = b + a * c
        If prmdiv(b1) = b1 Then
            c1 = c + b * a
            If prmdiv(c1) = c1 Then
               Text1.Text = Text1.Text & a & Str(b) & Str(c) & "    " & a + b + c & Str((a + b + c) Mod 6) & crlf
            End If
        End If
     End If
     DoEvents
   Next
   Next
 Next
 
 Text1.Text = Text1.Text & crlf & "done"

End Sub
Function prm(i)
  Dim p As Long
  Open "17-bit primes.bin" For Random As #111 Len = 4
  Get #111, i, p
  prm = p
  Close 111
End Function
Function prmdiv(num)
 Dim n, dv, q
 If num = 1 Then prmdiv = 1: Exit Function
 n = Abs(num): If n > 0 Then limit = Sqr(n) Else limit = 0
 If limit <> Int(limit) Then limit = Int(limit + 1)
 dv = 2: GoSub DivideIt
 dv = 3: GoSub DivideIt
 dv = 5: GoSub DivideIt
 dv = 7
 Do Until dv > limit
   GoSub DivideIt: dv = dv + 4 '11
   GoSub DivideIt: dv = dv + 2 '13
   GoSub DivideIt: dv = dv + 4 '17
   GoSub DivideIt: dv = dv + 2 '19
   GoSub DivideIt: dv = dv + 4 '23
   GoSub DivideIt: dv = dv + 6 '29
   GoSub DivideIt: dv = dv + 2 '31
   GoSub DivideIt: dv = dv + 6 '37
 Loop
 If n > 1 Then prmdiv = n
 Exit Function

DivideIt:
 Do
  q = Int(n / dv)
  If q * dv = n And n > 0 Then
    prmdiv = dv: Exit Function
   Else
    Exit Do
  End If
 Loop

 Return
End Function

  Posted by Charlie on 2016-10-17 10:51:13
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (9)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information