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

Home > Numbers
Triangular and Heptagonal Hindrance (Posted on 2022-12-22) Difficulty: 3 of 5
Each of x and y is a positive integer that satisfies this equation:
xoC=yoF

Determine the minimum value of x+y such that:
x is a triangular number and, y is a heptagonal pyramidal number.
What is the next smallest value of x+y?

*** oF = (9/5)*oC+32, where oF represents degree Fahrenheit and, oC represents degree Celsius.

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 Solution | Comment 2 of 3 |
sum       X         Y
1796 = 630 + 1166
2328 = 820 + 1508

630 is the 35th triangular number
1166 is the 11th heptagonal pyramidal number

820 is the 40th triangular number
1508 is the 12th heptagonal pyramidal number

I believe these are the only solutions having checked up to the 10^8-th triangular number.

-------------
def heptPyr(n):
    """ return the n-th heptagonal pyramidal number.  
    see oeis A002413 """
    return int(n*(n+1)*(5*n-2)/6)

def isHeptPyr(n):
    """ bool: True if n is a heptagonal pyramidal number.
    see oeis A002413  """
    x = int(n ** (1/3))
    y = [heptPyr(x),heptPyr(x+1)]
    return n in y

def istri(n):
    """ check if integer n is a triangular number """
    if  ((1 + (1+8*n)**.5)/2) % 1 == 0:
        return True
    else:
        return False

def c2f(n):
    """ Convert Celsius to Fahrenheit """
    if (n*9/5 + 32)%1 == 0:
        return int(n*9/5 + 32)
    else:
        return n*9/5 + 32
def f2c(n):
    """ Convert Fahrenheit to Celsius   """
    if ((n-32)*5/9)%1 == 0:
        return int((n-32)*5/9)
    else:
        return (n-32)*5/9

print('sum     X     Y')
for i in range(0,100000000,5):
    aTri = int((i+1)*i/2)
    fahrTri = c2f(aTri)
    if isHeptPyr(fahrTri):
        print(aTri+fahrTri, '=',aTri,'+',fahrTri)

  Posted by Larry on 2022-12-22 10:29:14
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 (5)
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