Fun Maths Problem
#17
(20 Oct 12, 10:12PM)Roflcopter Wrote: Bonus marks if you can find a simple method to find the actual consecutive numbers.

I guess we didn't explicitly do this:

Say you want to find a sequence of x consecutive numbers that total up to y.

If x is an odd number, y must be divisible by x for there to be a possible solution for x numbers.

e.g. find out which 3 numbers can make 21.

21/3 = 7 -- then you add an equal amount of numbers on both sides of this number until you have a sequence of x numbers and there's your answer.

6...7...8 (6+7+8=21)

If x is even, it's a little different. The quotient of y/x must be exactly between two integers. You can double y temporarily and half the quotient to see if it is between two integers (basically 2y/x must be an odd number)

e.g. find out which 4 numbers can make 14.

14/4 = 3.5 OR 14*2(28) / 4 (7) / 2 (3.5)

The middle numbers of your sequence will be Q - 0.5, Q + 0.5, where Q is the quotient to the above problem (when it is exactly between two integers)

3...4

Add numbers to both sides until you have a sequence of x numbers:

2...3...4...5 (2+3+4+5=14)
Thanks given by:


Messages In This Thread
Fun Maths Problem - by Roflcopter - 20 Oct 12, 10:12PM
RE: Fun Maths Problem - by Enam - 20 Oct 12, 11:00PM
RE: Fun Maths Problem - by #M|A#Wolf - 20 Oct 12, 11:01PM
RE: Fun Maths Problem - by Roflcopter - 20 Oct 12, 11:11PM
RE: Fun Maths Problem - by Felix-The-Ghost - 21 Oct 12, 12:47AM
RE: Fun Maths Problem - by Roflcopter - 21 Oct 12, 01:28AM
RE: Fun Maths Problem - by Felix-The-Ghost - 21 Oct 12, 01:31AM
RE: Fun Maths Problem - by Roflcopter - 21 Oct 12, 01:39AM
RE: Fun Maths Problem - by Felix-The-Ghost - 21 Oct 12, 02:43AM
RE: Fun Maths Problem - by Roflcopter - 21 Oct 12, 04:31PM
RE: Fun Maths Problem - by Marti - 21 Oct 12, 01:04PM
RE: Fun Maths Problem - by MykeGregory - 21 Oct 12, 01:16PM
RE: Fun Maths Problem - by Xenon - 21 Oct 12, 02:31PM
RE: Fun Maths Problem - by Andrez - 21 Oct 12, 11:29PM
RE: Fun Maths Problem - by Link - 22 Oct 12, 02:16AM
RE: Fun Maths Problem - by Marti - 22 Oct 12, 12:02PM
RE: Fun Maths Problem - by Felix-The-Ghost - 23 Oct 12, 01:57AM
RE: Fun Maths Problem - by FleshyPod - 23 Oct 12, 05:30AM
RE: Fun Maths Problem - by #M|A#Wolf - 23 Oct 12, 05:48AM
RE: Fun Maths Problem - by FleshyPod - 23 Oct 12, 09:05PM
RE: Fun Maths Problem - by Oracle - 24 Oct 12, 12:47AM