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

Home > Numbers
Triangular Cube (Posted on 2023-12-29) Difficulty: 3 of 5
If N is a nonnegative integer, the triangular number T(N)=1+2+3+...+N is given by N(N+1)/2.

Find a prime P such that the sum of the proper divisors of T(P) is a cube.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Computer solution Comment 2 of 2 |
I also find only 2 and 53.
If N is included, and use the sum of all divisors, rather than proper divisors excluding N, then I found no solutions.

-----
Program output:
2 3 1 1
53 1431 729 9

--------------------
def isprime(n):
    '''check if integer n is a prime'''
    n = abs(int(n))
    if n < 2:
        return False
    if n == 2: 
        return True    
    if not n & 1: 
        return False
    for x in range(3, int(n**0.5)+1, 2):
        if n % x == 0:
            return False
    return True

def tri(n):
    """ input an integer, returns the n-th triangular number. """
    return int(n*(n+1)/2)

def iscube(n):
    """ Input an integer, Returns True iff it is a perfect cube. """
    if round(n**(1/3))**3 == n:
        return True
    else:
        return False

def proper_divisors(n):
    """ input integer, output list of lists of divisors of n 
    including 1 but not including n   """
    divisors = [1]
    for i in range(2,int(n/2)+2):
        if (n/i)%1 != 0:
            continue
        divisors.append(i)
    return divisors

big = 1000
primes = [i for i in range(1,big) if isprime(i)]

for n in primes:
    if not iscube(sum(proper_divisors(tri(n)))):
        continue
    print(n, tri(n), sum(proper_divisors(tri(n))), round((sum(proper_divisors(tri(n))))**(1/3)))

  Posted by Larry on 2023-12-29 10:47:48
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