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

Home > Numbers
Factorials to Squares (Posted on 2009-02-25) Difficulty: 3 of 5
Find three different positive integers whose factorials are each one less than a perfect square, such that the total of all three factorials is also a perfect square.

  Submitted by Charlie    
No Rating
Solution: (Hide)
The three numbers are 4 5 7

Their factorials, factorials incremented by 1 and the square roots of the latter are:

 24  25  5.0        120  121  11.0          5040  5041  71.0

The total of the factorials is 24 + 120 + 5040 = 5184, which is the square of 72.

   10   for T=6 to 1000
   20   for A=1 to int(T/3)
   23    Sq1=!(A)+1:Sr=int(sqrt(Sq1))
   24    if Sr*Sr=Sq1 then
   30     :for B=A+1 to int((T-A)/2)
   32     :Sq2=!(B)+1:Sr=int(sqrt(Sq2))
   34     :if Sr*Sr=Sq2 then
   40     :C=T-A-B
   50     :Sq3=!(C)+1:Sr=int(sqrt(Sq3))
   60     :if Sr*Sr=Sq3 then
   70     :Sq4=!(A)+!(B)+!(C):Sr=int(sqrt(Sq4))
   80     :if Sr*Sr=Sq4 then print A;B;C
   82     :print !(A);!(A)+1;sqrt(!(A)+1),
   83     :print !(B);!(B)+1;sqrt(!(B)+1),
   84     :print !(C);!(C)+1;sqrt(!(C)+1)
   85     :print !(A)+!(B)+!(C);sqrt(!(A)+!(B)+!(C))
   89     :endif
   90     :endif
  100     :endif
  110     :next
  120   next
  130   next

Comments: ( You must be logged in to post comments.)
  Subject Author Date
Some ThoughtsPuzzle ThoughtsK Sengupta2023-01-05 01:55:34
Some ThoughtsInteger sequence for n! +1 = p^2 (help)Jer2009-02-26 14:55:52
SolutionsolutionDej Mar2009-02-25 13:41:01
solutioned bottemiller2009-02-25 12:21:45
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