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

Home > Just Math
Getting the Numbers With Product And Quotient (Posted on 2007-09-17) Difficulty: 3 of 5
(A) Analytically determine all possible two digit positive decimal integers n, that satisfy this equation:

       n = p + 4c

where p is the product of the digits of n, while c is the result when the unit’s digit is divided by the tens digit.

(B) For what positive integer bases N< 10 do valid solutions to the above equation exist?

See The Solution Submitted by K Sengupta    
Rating: 2.6667 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution non-analytic (spoiler) | Comment 2 of 7 |

base = 3
  22 = 11 + 4*1

base = 4
  11 = 1 + 4*1

base = 6
  24 = 12 + 4*2

base = 8
  12 = 2 + 4*2

base = 9
  26 = 13 + 4*3

base = 10
  39 = 27 + 4*3

base = 12
  13 = 3 + 4*3
  28 = 14 + 4*4

base = 15
  2A = 15 + 4*5

base = 16
  14 = 4 + 4*4

base = 18
  2C = 16 + 4*6

base = 20
  15 = 5 + 4*5
  3i = 2E + 4*6

base = 21
  2E = 17 + 4*7

base = 24
  16 = 6 + 4*6
  2G = 18 + 4*8

base = 27
  2i = 19 + 4*9

base = 28
  17 = 7 + 4*7

base = 30
  2K = 1A + 4*A
  3R = 2L + 4*9

base = 32
  18 = 8 + 4*8

base = 33
  2M = 1B + 4*B

base = 36
  19 = 9 + 4*9
  2o = 1C + 4*C

base = 39
  2Q = 1D + 4*D

base = 40
  1A = A + 4*A
  3 = 2S + 4*C

base = 42
  2S = 1E + 4*E

base = 44
  1B = B + 4*B

base = 45
  2U = 1F + 4*F

base = 48
  1C = C + 4*C
  2W = 1G + 4*G

where A represents 10, B represents 11, etc., and i and o have been lowercased to avoid confusion with 1 and 0.

Something must have gone awry with Ady's analysis as base 10 has only one solution. The first base with more than one solution is base 12.

 

DECLARE FUNCTION dig$ (n#)
DECLARE FUNCTION cvb$ (n#)
DEFDBL A-Z
DIM SHARED b
PRINT
FOR b = 2 TO 48
 done = 0
 FOR n1 = 1 TO b - 1
  FOR n2 = 1 TO b - 1
   IF b * n1 + n2 = n1 * n2 + 4 * n2 / n1 THEN
     IF done = 0 THEN
          PRINT
          PRINT "base ="; b
          done = 1
     END IF
     PRINT "  "; dig$(n1); dig$(n2); " = "; cvb$(n1 * n2); " + 4*"; cvb$(n2 / n1)
   END IF
  NEXT
 NEXT
NEXT b

FUNCTION cvb$ (n)
 build$ = ""
 r = n
 DO
   d = r MOD b
   r = r \ b
   build$ = dig$(d) + build$
 LOOP UNTIL r = 0
 cvb$ = build$
END FUNCTION

FUNCTION dig$ (n)
 dig$ = MID$("0123456789ABCDEFGHiJKLMNoPQRSTUVWXYZ", n + 1, 1)
END FUNCTION

 

Edited on September 17, 2007, 12:09 pm
  Posted by Charlie on 2007-09-17 11:53:36

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 (11)
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