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

Home > Just Math
All in the family (Posted on 2011-11-20) Difficulty: 2 of 5
Teenager A: I found an interesting relation between my age and the age of my father. Multiplying my age by the age of my father I get the same result if we use the correct ages or if both of us reverse the ages' digits prior to the multiplication.
Same happens if I do it with my grandfather's or even with my aged grand-grand father's ages.
B, A's brother: That applies to my age as well.
C, a friend: My age, too. But no grand-grandfather...
All the ages (A,B,C) are distinct.
What are they?

No Solution Yet Submitted by Ady TZIDON    
Rating: 4.5000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution revised solution, for revised puzzle | Comment 11 of 17 |

CLS
OPEN "allfamil.txt" FOR OUTPUT AS #2
FOR teen = 11 TO 50
 revteen = (teen MOD 10) * 10 + (teen \ 10)
 FOR father = teen + 12 TO teen + 70
   revfath = (father MOD 10) * 10 + (father \ 10)
   IF teen * father = revteen * revfath THEN
     FOR grand = father + 12 TO father + 70
       grands$ = LTRIM$(STR$(grand))
       r$ = ""
       FOR i = 1 TO LEN(grands$)
        r$ = MID$(grands$, i, 1) + r$
       NEXT
       revgrand = VAL(r$)
       IF teen * grand = revteen * revgrand AND grand < 100 THEN
           PRINT teen, father, grand
           PRINT #2, teen, father, grand
           FOR great = grand + 12 TO grand + 77
               greats$ = LTRIM$(STR$(great))
               r$ = ""
               FOR i = 1 TO LEN(greats$)
                r$ = MID$(greats$, i, 1) + r$
               NEXT
               revgreat = VAL(r$)
               IF teen * great = revteen * revgreat AND great < 100 THEN
                 PRINT teen, father, grand, great
                 PRINT #2, teen, father, grand, great
               END IF
           NEXT
       END IF
     NEXT grand
   END IF
 NEXT father
NEXT teen

This expands the age group considered and limits the highest age to under 100.

In keeping with the spirit of reversing the digits would mean, ages 11, 22, 33 and 44 were deleted from the possibilities:


 12            42            63
 12            42            63            84
 12            42            84
 12            63            84
 13            31            62
 13            31            62            93
 13            31            93
 13            62            93
 14            41            82
 21            36            48
 23            64            96
 24            42            63
 24            42            63            84
 24            42            84
 24            63            84
 26            62            93
 28            41            82
 32            46            69
 36            63            84
 39            62            93
 46            64            96
 48            63            84

Only the 12- and 24-year-olds can share a common age, 84, for their great grandfather and so are the brothers, while C can be any of the 13-, 14-, 23-, etc. agers.


  Posted by Charlie on 2011-11-21 12:34:33
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 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information