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

Home > Just Math
Power and Divisibility Puzzle (Posted on 2015-08-12) Difficulty: 3 of 5
Determine the total number of positive integer values of N < 20150 such that:
2N - N2 is divisible by 17

See The Solution Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 6
DefDbl A-Z
Dim crlf$


Private Sub Form_Load()
 Form1.Visible = True
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)

 pwr2 = 1
 For n = 1 To 20149
  pwr2 = (pwr2 * 2) Mod 17
  tst = pwr2 - n * n
  If tst Mod 17 = 0 Then
   ct = ct + 1
  End If
 Next


 Text1.Text = Text1.Text & ct & crlf & " done"
  
End Sub

finds

2371

  Posted by Charlie on 2015-08-12 15:50: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 (19)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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