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

Home > Just Math
Subtract 1, get a square (Posted on 2009-06-24) Difficulty: 2 of 5
By subtracting 1 from the positive base N integer having the form XYXYXYZY, we get a perfect square. It is known that each of X, Y and Z represents a different base N digit from 0 to N-1, and X is nonzero.

What are the integer value(s) of N, with 3 ≤ N ≤ 16 for which this is possible?

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 extended computer list | Comment 3 of 4 |
 
                  Decimal
n x y z square square root
 3    1  2  0  4096          64
 5    3  2  0  276676        526
 6    4  2  0  1247689       1117
 7    5  2  0  4443664       2108
 8    6  2  0  13315201      3649
 9    7  2  0  34975396      5914
10    4  5  6  45454564      6742
10    8  2  0  82828201      9101
11    9  2  0  180418624     13432
12   10  2  0  366837409     19153
13   11  2  0  704053156     26534
14   12  2  0  1286585161    35869
15   13  2  0  2253970576    47476
16   14  2  0  3806519809    61697
17   15  2  0  6224894404    78898
18   16  2  0  9894081961    99469
19   17  2  0  15332382976   123824
20   18  2  0  23226064801   152401
21   19  2  0  34470378244   185662
22   20  2  0  50217672649   224093
23   21  2  0  71933385616   268204
23   21 19 20  74454762496   272864
24   22  2  0  101460723841  318529
25   23  2  0  141094891876  375626
 
DEFDBL A-Z
CLS
FOR n = 2 TO 25
  psn(0) = 1
  FOR i = 1 TO 7
    psn(i) = n * psn(i - 1)
  NEXT
  FOR x = 1 TO n - 1
   xpart = x * (psn(7) + psn(5) + psn(3))
  FOR y = 0 TO n - 1
   ypart = y * (psn(6) + psn(4) + psn(2) + 1)
  IF y <> x THEN
  FOR z = 0 TO n - 1
  IF z <> y AND z <> x THEN
    zpart = z * n
    xyxyxyzy = xpart + ypart + zpart
    sr = INT(SQR(xyxyxyzy - 1) + .5)
    IF sr * sr + 1 = xyxyxyzy THEN
     IF n <> nPrev THEN PRINT
     PRINT USING "##   ## ## ##"; n; x; y; z;
     PRINT , xyxyxyzy - 1, SQR(xyxyxyzy - 1)
     nPrev = n
    END IF
  END IF
  NEXT
  END IF
  NEXT
  NEXT
NEXT n

  Posted by Charlie on 2009-06-24 17:03:37
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 (10)
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