 All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars  perplexus dot info  Some questions of abundance (Posted on 2015-10-28) Under what conditions is the number 2n*p an abundant number? Where n is a positive integer and p is prime.

Recall an abundant number is one whose proper factors sum to more than the number. For example 18 is abundant because 1+2+3+6+9 > 18.

 No Solution Yet Submitted by Jer No Rating Comments: ( Back to comment list | You must be logged in to post comments.) re(2): proposed solution / counterexample Comment 3 of 3 | (In reply to re: proposed solution / counterexample by Jer)

Doing some calculations via program I see

when n=1, none are abundant
n=2 highest prime giving abundance is 5
n=3 highest prime giving abundance is 13
n=4 highest prime giving abundance is 29
n=5 highest prime giving abundance is 61
n=6 highest prime giving abundance is 113
n=7 highest prime giving abundance is 251
n=8 highest prime giving abundance is 509
n=9 highest prime giving abundance is 1021
n=10 highest prime giving abundance is 2039
n=11 highest prime giving abundance is 4093
n=12 highest prime giving abundance is 8179
n=13 highest prime giving abundance is 16381
n=14 highest prime giving abundance is 32749
n=15 highest prime giving abundance is 65521

Except for n=1, all primes p less than 2^(n+1) - 1 work.

If 2^(n+1) - 1 is prime then that is the first non-working p and it results in a perfect number.

DefDbl A-Z
Dim crlf\$

Form1.Visible = True

Text1.Text = ""
crlf = Chr\$(13) + Chr\$(10)

For n = 2 To 15
p = 1
Do
DoEvents
ppp = pp
pp = p
p = nxtprm(p)
If (p + 1) * ((2 ^ (n + 1)) - 1) - p * 2 ^ n > p * 2 ^ n Then sv = p
'  Text1.Text = Text1.Text & n & Str(p) & "    "
'  Text1.Text = Text1.Text & p * 2 ^ n & Str((p + 1) * ((2 ^ (n + 1)) - 1) - p * 2 ^ n) & crlf
Loop Until (p + 1) * ((2 ^ (n + 1)) - 1) - p * 2 ^ n < p * 2 ^ n: Text1.Text = Text1.Text & crlf
p = sv
Text1.Text = Text1.Text & n & Str(p) & "    "
Text1.Text = Text1.Text & p * 2 ^ n & Str((p + 1) * ((2 ^ (n + 1)) - 1) - p * 2 ^ n) & crlf
Next
Text1.Text = Text1.Text & crlf & " done"

End Sub

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

Function nxtprm(x)
Dim n
n = x + 1
While prmdiv(n) < n
n = n + 1
Wend
nxtprm = n
End Function

 Posted by Charlie on 2015-10-28 13:06:43 Please log in:

 Search: Search body:
Forums (4)