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

Home > Numbers
Friendly numbers (Posted on 2023-06-02) Difficulty: 4 of 5
The abundancy index of a number is the ratio of the sum of its factors to the number itself.

For example a(12)=σ(n)/n=(1+2+3+4+6+12)/12 = 28/12 = 7/3.

Two numbers n and m are said to be friends if a(n)=a(m). Numbers that have at least one friend are called friendly numbers. Numbers with no friends are called solitary.

Task 1: Find at least one friend for the number 12.

Task 2: Prove there is a set of at least 50 mutual friends.

Task 3: Prove if the fraction σ(n)/n cannot be reduced then n is solitary.

Task 4: a(18)=39/18 which does reduce to 13/6. Prove 18 is solitary nevertheless.

Quite a few numbers have unknown status. The smallest of which is 10. I won't ask you to prove the status of any of these.

No Solution Yet Submitted by Jer    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Task 1 only | Comment 1 of 5
234 is a friend of 12
abundancy(12) = '7/3'
abundancy(234) = '7/3'

----
def sumfactors(n):
    """  for integer n, return a list of all the factors including 1 and n """
    ans = [1,n]
    for i in range(2,2+int(n**.5)):
        if n%i == 0:
            ans.append(i)
            ans.append(int(n/i))

    return sum(set(ans))

def abundancy(n):
    """  start with an integer, convert to string version of
    simplest fraction of a(n)/n  """
    if n == 0:
        return '0/1'
    s = sumfactors(n)
    g = gcd(s,n)
    numer = int(s/g)
    denom = int(n/g)
    return str(numer) + '/' + str(denom)

  Posted by Larry on 2023-06-02 11:50:34
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 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information