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

Home > Numbers
Digits of N^6 (Posted on 2023-10-11) Difficulty: 3 of 5
Find a positive integer N such that the digits of N combined with the digits of N^2 and the digits of N^3 are exactly the digits of N^6.

Extra credit: Find additional solutions, other than multiples of 10.

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 1 of 3
[Edit:  I forgot to put my solutions in this post, I put them in my next post above, sorry for the confusion]

I assumed the puzzle is calling for the same number of instances of each digit.

I first checked to see what subset of numbers had the correct numbers of digits to make a solution possible.  For 10 digit numbers, the first success was 6812920691.
For different numbers of digits, the left most significant digits started with the same pattern.  I left this code in, but commented out.
So, for 3-digit numbers, no need to check 100 to 680; just start at 681.
This number represents the sixth root of 0.1 times some power of 10.
Eliminating 68% of the numbers from the search roughly tripled the speed of the program.

Any solution found will have an infinite number of companion solutions simply by adding an arbitrary number of zeros to the end of n.  If n has one extra zero, n^2 has 2, n^3 has 3 thus adding 6 zeros which is the same number of zeros added to n^6.

-------------
start = .1 ** (1/6)
i = 2
for i in range(1,9):
    print(i)
    for n in range(int(start * 10**i),10**i + 1):
        d1 = str(n)
        d2 = str(n**2)
        d3 = str(n**3)
        d6 = str(n**6)
        # if len(d1)+len(d2)+len(d3) == len(d6):
        #     print(n)
        #     break
        if ''.join(sorted(d1+d2+d3))  ==  ''.join(sorted(d6)):
            print(n, n**2, n**3, n**6, ' ')

Edited on October 11, 2023, 2:23 pm
  Posted by Larry on 2023-10-11 08:57:37

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