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

Home > Numbers
6 Digit Square Alphametic (Posted on 2023-07-05) Difficulty: 3 of 5
A six digit perfect square is represented as AABCAB where the same letter represents the same digit, but a different letter represents a different digit.
It is also known that both these relationships are simultaneously satisfied:
  • The numbers represented by each of AAB and CAB is a perfect square.
  • The numbers represented by each of AB and ABC is a perfect square.
Determine the digits represented by A, B, and C.

Note: Computer program solutions are welcome, but a semi-analytic(calculator+ p&p) method is preferred.

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 11 |
Given that AB is in {16,25,36,49,64,81},
ABC is limited to {169, 256, 361}
So A is in {1,2,3}
B is in {5,6}
C is in {1,6,9}
AAB candidates are only 115,116,225,226,335,336 of which only 225 is a square:
A = 2
B = 5
CAB is x25 which can only be 225 or 625, but one of these is already taken.
CAB = 625
C = 6
AABCAB = 225625 = 475^2

After the analytic solution, I did a programmatic solution.  While I didn't strictly time each one, my impression is that the analytic one took about twice as long as did writing the program.
"""
sq = []
for i in range(1,1000):
    sq.append(i*i)

for a in range(10):
    for b in range(10):
        if 10*a+b not in sq:
            continue
        for c in range(10):
            if 110*a+b not in sq:
                continue
            if 100*a+10*b+c not in sq:
                continue
            if 100*c+10*a+b not in sq:
                continue
            print(a,a,b,c,a,b)

  Posted by Larry on 2023-07-06 06:19:29
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
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