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

Home > Numbers
FOUR SQUARES (Posted on 2013-08-23) Difficulty: 3 of 5
Let n be a non-negative integer.
Find the non-negative integers a, b, c, d such that a2+b2+c2+d2=7*4n

See The Solution Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer-guided solution Comment 1 of 1

DEFDBL A-Z
FOR n = 0 TO 10
  PRINT n
  rhs = INT(7 * 4 ^ n + .5)
  FOR a = 0 TO SQR(rhs)
   FOR b = a TO SQR(rhs - a * a)
     FOR c = b TO SQR(rhs - a * a - b * b)
       rm = rhs - a * a - b * b - c * c
       d = INT(SQR(rm) + .5)
       IF d * d = rm AND d >= c THEN
          PRINT a; b; c; d, a * a; b * b; c * c; d * d
       END IF
     NEXT
   NEXT
  NEXT
NEXT n

shows the values of a,b,c and d in ascending order, so the values can be any permuation of these:

 0 
 1  1  1  2                  1  1  1  4
 
 1
 1  1  1  5                  1  1  1  25
 1  3  3  3                  1  9  9  9
 2  2  2  4                  4  4  4  16
 
 2
 2  2  2  10                 4  4  4  100
 2  6  6  6                  4  36  36  36
 4  4  4  8                  16  16  16  64
 
 3
 4  4  4  20                 16  16  16  400
 4  12  12  12               16  144  144  144
 8  8  8  16                 64  64  64  256
 
 4
 8  8  8  40                 64  64  64  1600
 8  24  24  24               64  576  576  576
 16  16  16  32              256  256  256  1024
 
 5
 16  16  16  80              256  256  256  6400
 16  48  48  48              256  2304  2304  2304
 32  32  32  64              1024  1024  1024  4096
 
 6
 32  32  32  160             1024  1024  1024  25600
 32  96  96  96              1024  9216  9216  9216
 64  64  64  128             4096  4096  4096  16384
 
 7
 64  64  64  320             4096  4096  4096  102400
 64  192  192  192           4096  36864  36864  36864
 128  128  128  256          16384  16384  16384  65536
 
 8
 128  128  128  640          16384  16384  16384  409600
 128  384  384  384          16384  147456  147456  147456
 256  256  256  512          65536  65536  65536  262144
 
 9
 256  256  256  1280         65536  65536  65536  1638400
 256  768  768  768          65536  589824  589824  589824
 512  512  512  1024         262144  262144  262144  1048576
 
 10
 512  512  512  2560         262144  262144  262144  6553600
 512  1536  1536  1536       262144  2359296  2359296  2359296
 1024  1024  1024  2048      1048576  1048576  1048576  4194304

Other than for n = 0, these are:

2^(n-1), 2^(n-1), 2^(n-1), 5 * 2^(n-1)
2^(n-1), 3 * 2^(n-1), 3 * 2^(n-1), 3 * 2^(n-1)
2^n, 2^n, 2^n, 2^(n+1)

The puzzle does not specify that they be in ascending order, so permutations within each of these also satisfy for a, b, c and d.


  Posted by Charlie on 2013-08-23 22:55:26
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 (23)
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