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

Home > Numbers
Quartic and Near Pandigital II (Posted on 2024-07-06) Difficulty: 3 of 5
Determine all possible value(s) of a positive duodecimal integer N, such that N and N^4 together contain precisely nine digits from 0 to 9 which are all different. Neither N nor N^4 can contain any leading zero.

No Solution Yet Submitted by K Sengupta    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Computer Solution Comment 1 of 1
I found a single solution
duodecimal N=45.

First, I determine the smallest and largest decimal integers which will yield a combined 9 digits when N and N^4 (in base 12) are concatenated.

    base 10 12  12
smallest 42 36 1060900
largest   77 65 B933241

53 45 2786301

Base 10: n=53,  n^4=7890481
Base 12: N=45, N^4=2786301

-----------
def digitcount(n):
    a = base2base(n,10,12)
    b = base2base(n**4,10,12)
    return len(a+b)

oldL = 0
newL = 0
for n in range (10000):
    newL = digitcount(n)
    if oldL < 9 and newL == 9:
        print('smallest', n, base2base(n,10,12), base2base(n**4,10,12))
        low = n
    if oldL == 9 and newL > 9:
        print('largest', n-1, base2base(n-1,10,12), base2base((n-1)**4,10,12))
        high = n-1
    oldL = newL

print()

for n in range (low, high+1):
    a = base2base(n,10,12)
    b = base2base(n**4,10,12)
    c = a+b
    if len(c) != len(set(c)):
        continue
    if 'A' in c or 'B' in c:
        continue
    print(n, a, b)

  Posted by Larry on 2024-07-06 10:23:55
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 (2)
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