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

Home > Numbers
Terminating in Eight 8s (Posted on 2023-06-20) Difficulty: 3 of 5
Determine the minimum value of a positive base ten integer N, such that each of the last eight digits of N3 is 8 but the ninth digit from the right in N3 is NOT 8.

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 1 of 2
n^3 ends in 8 if n ends in 2
n^3 ends in 88 if n ends in 42 + k*50
n^3 ends in 888 if n ends in 442 + k*250
n^3 ends in 8888 if n ends in 1942 + k*2500
n^3 ends in 88888 if n ends in 1942 + k*25000
n^3 ends in 888888 if n ends in 76942 + k*250000
n^3 ends in 8888888 if n ends in 1576942 + k*2500000
n^3 ends in 88888888 if n ends in 11576942 + k*25000000

So the requested value for N is 11576942
N^3 = 1551606436464188888888

Determined with the small program below sequentially altering the number of final 8s and adjusting the limits for the loop accordingly.
"""
big = 100000000
for n in range(1576942,big,2500000):
    s = str(n**3)[-9:]
    if s[-8:] == '88888888':
        print(n, n**3, s)


  Posted by Larry on 2023-06-20 09:07:20
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