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

Home > Numbers
Same Digits #3 (Posted on 2024-01-23) Difficulty: 2 of 5
N is a base ten integer, let D(N) denote the set of its decimal digits. For example, D(3131663) is {1,3,6}.

Find the first 3 positive integers such that D(N)=D(N²)=D(N³), other than the trivial solutions 1, 10, 100, etc.

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 1
D(N), N, N², N³
  
[0, 1, 2, 4, 5, 6, 7] 
4152760 
17245415617600 
71616072160144576000

[1, 2, 4, 5, 6, 8, 9] 
9845261 
96929164158121 
954292919648546514581

[0, 1, 2, 3, 4, 5, 7, 9] 
10253497 
105134200729009 
1077993211772291594473

----------------------------
def d(n):
    """ for integer n, d(n) is the set of digits of n """
    return set(str(n))

for n in range(4152760,1000000000):
    x = d(n)
    if str(n)[0] == '1' and  d(int(str(n)[1:])) == {'0'}:
        continue
    if x == d(n**2) and x == d(n**3):
        d_of_n = sorted([int(char) for char in x])
        print(d_of_n, n, n**2, n**3)


  Posted by Larry on 2024-01-23 12:33:02
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 (12)
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