CPhill

avatar
BenutzernameCPhill
Punkte130554
Membership
Stats
Fragen 56
Antworten 43469

 #6
avatar+130554 
+10

I've given some more thought to this problem....I may have hit upon a "solution" [but, I'm not sure]...anyway....here's what I discovered.....

First of all, any positive square root, a, can always be written in one of the following two forms....

floor (√a) * (√a) = a     or    floor (-√a) * (√a)  = a

Now, except for the special case noted below....any other positive integer, n, can be written in one of the following two forms.....

floor (n/√s1) * (n/√s1)   or  floor (-n/√s2) * (-n/√s2)    ....where s1 and s2 are the the smaller and larger perfect squares, respectively, on either side of n

Let's take the given question as an example .....note the the two perfect squares on either side of 27 are 25 and 36...so, let us guess that we might be able to  write 27 in terms of  s1, i.e., 25.  So we have...

floor(27/ √25) * (27 /√25) = floor (27/5) * (27/5) = floor(5.4) * (27/5) = (5) * (27/5)  = 27 ....!!!

 

Now let's look at another number, say, 31.....and let's guess that we can write it in terms of s1, also...so we have

floor(31/ √25) * (31 /√25) = floor (31/5) * (31/5) = floor(6.2) * (31/5) = (6) * (27/5)  = 32.4 ....nope, that doesn't work out....so, let's try s2  - (i.e, 36).......and we have

floor(-31/ √36) * (-31 /√36) = floor (-31/6) * (/-31/6) = floor(-5.4) * (-31/6) = (-6) * (-31/6)  = 31....!!! .....just what we hoped for !!!

 

The small exception to the rule is any number that can be factored in terms of (p) (p+1)....let us consider the number 12, which can be written in terms of (3) * (4)

Now... the smaller and larger perfect squares on either side of 12 are 9 and 16....so...using our method, s1, (i.e., 9) yields the following result

floor(12/ √9) * (12/√9) = floor (12/3) * (12/3) = floor(4) * (4) = (4) * (4)  = 16 ....!!!...that's no good

Let's try s2 , (i.e., 16)...so we have

floor(12/ √16) * (12/√16) = floor (12/4) * (12/4)= floor(3) * (3) = (3) * (3)  = 9...!!!..and that's no good, either....so.. ..these types of numbers are "skipped" 

---------------------------------------------------------------------------------------------------------------

I see that Melody has posted an answer, as well......I'll take a look at hers...maybe it's better than mine...!!

x * floor(x)  = n

Melody's solution will work for 27

But, consider 12

x  = 12 / floor (√12) 

x  = 12/3

x = 4

I don't think this works out in this case, Melody....if x = 4, then floor(x) = floor(4)  = 4

And 4 * floor(4) = 16, not 12

Also, consider 31

x  =   31 / floor (√31)

x   = 31 / 5 

So x = 31/5

And

(31/5) * floor (31/5)  =

 (6.2)* (6)=   37.2, not 31....

08.01.2015