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

Home > Just Math
Hundred Product Hinder (Posted on 2016-06-13) Difficulty: 3 of 5
N is a positive integer and D(N) denotes the total number of positive divisors of N (including 1 and N).

Find all N such that: N = 100*D(N).

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 (seems unique) Comment 2 of 2 |
2000 seems to be the only such number, with 20 factors.

I'll leave to someone else to prove how fast the number n must continue to exceed 100 times their number of factors as n gets larger. Up to n=10,000,000 the number of factors never exceeds 448 (achieved at n = 8,648,640 = 2^6 * 3^3 * 5 * 7 * 11 * 13).

Starting with 100, each new record number of factors is recorded below with the number that achieves that record. These lines are preceded by four hyphens. The report of the answer showns n=2000 with 20 factors. 2000 is 2^4 * 5^3 and so has (4+1)*(3+1) factors.

---- 100 9
---- 108 12
---- 120 16
---- 180 18
---- 240 20
---- 360 24
---- 720 30
---- 840 32
---- 1260 36
---- 1680 40
2000 20
  2 4
  5 3
---- 2520 48
---- 5040 60
---- 7560 64
---- 10080 72
---- 15120 80
---- 20160 84
---- 25200 90
---- 27720 96
---- 45360 100
---- 50400 108
---- 55440 120
---- 83160 128
---- 110880 144
---- 166320 160
---- 221760 168
---- 277200 180
---- 332640 192
---- 498960 200
---- 554400 216
---- 665280 224
---- 720720 240
---- 1081080 256
---- 1441440 288
---- 2162160 320
---- 2882880 336
---- 3603600 360
---- 4324320 384
---- 6486480 400
---- 7207200 432
---- 8648640 448

DefDbl A-Z
Dim crlf$, fct(20, 1)
Function mform$(x, t$)
  a$ = Format$(x, t$)
  If Len(a$) < Len(t$) Then a$ = Space$(Len(t$) - Len(a$)) & a$
  mform$ = a$
End Function

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

 For n = 100 To 10000000
   DoEvents
   f = factor(n)
   factors = 1
   For i = 1 To f
     factors = factors * (fct(i, 1) + 1)
   Next
   If n = 100 * factors Then
     Text1.Text = Text1.Text & n & Str(factors) & crlf
     For i = 1 To f
       Text1.Text = Text1.Text & "  " & fct(i, 0) & Str(fct(i, 1)) & crlf
     Next
   End If
   If factors > maxfactors Then
     maxfactors = factors
     Text1.Text = Text1.Text & "----" & Str(n) & Str(factors) & crlf
   End If
 Next

 Text1.Text = Text1.Text & crlf & " done"

End Sub


Function factor(num)
 diffCt = 0: good = 1
 nm1 = Abs(num): If nm1 > 0 Then limit = Sqr(nm1) 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
   If INKEY$ = Chr$(27) Then s$ = Chr$(27): Exit Function
 Loop
 If nm1 > 1 Then diffCt = diffCt + 1: fct(diffCt, 0) = nm1: fct(diffCt, 1) = 1
 factor = diffCt
 Exit Function

DivideIt:
 cnt = 0
 Do
  q = Int(nm1 / dv)
  If q * dv = nm1 And nm1 > 0 Then
    nm1 = q: cnt = cnt + 1: If nm1 > 0 Then limit = Sqr(nm1) Else limit = 0
    If limit <> Int(limit) Then limit = Int(limit + 1)
   Else
    Exit Do
  End If
 Loop
 If cnt > 0 Then
   diffCt = diffCt + 1
   fct(diffCt, 0) = dv
   fct(diffCt, 1) = cnt
 End If
 Return
End Function


  Posted by Charlie on 2016-06-13 15:15:33
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 (11)
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