Jump to content
BrainDen.com - Brain Teasers
  • 1

Help! A remainder is chasing me


bonanova
 Share

Question

I just found a number with an interesting property:

When I divide it by 2, the remainder is 1.

When I divide it by 3, the remainder is 2.

When I divide it by 4, the remainder is 3.

When I divide it by 5, the remainder is 4.

When I divide it by 6, the remainder is 5.

When I divide it by 7, the remainder is 6.

When I divide it by 8, the remainder is 7.

When I divide it by 9, the remainder is 8.

When I divide it by 10, the remainder is 9.

It's not a small number, but it's not really big, either.

When I looked for a smaller number with this property I couldn't find one.

Can you find it?

Link to comment
Share on other sites

Recommended Posts

  • 0

My answer is below, is this the answer you were looking for or is there a lower one?

2519

Just because your voice reaches halfway around the world doesn't mean you are wiser than when it reached only to the end of the bar.

  • Upvote 1
Link to comment
Share on other sites

  • 0

That's it.

Here's my method: [care to share yours?]

The number has to end in 9.

Looked brute force for small numbers.

59 and 119 were promising, but no cigar.

Then looked for agreement among

39 + multiples of 40,

69 + multiples of 70 and

89 + multiples of 90

Smallest one was 2519.

Still think of this as kind of brute force.

Maybe there is no elegant solution.

Link to comment
Share on other sites

  • 0

I am afraid, it was pretty much the 'brute force' method.

As you say 59 and 119 looked promising, both working upto and including 6, but 7 was the dificulty, so I tried each increment of 60 (179, 239, 299 ...), until I got to 419, which worked for 7 as well, (hooray) but not 9 or 10 (boo). Then using the same logic as before (59 being the first number that worked up the number 6, Increments of 60 always worked for the first 6 numbers. So 419 being the first that works for numbers up to 7 I incremented by 420.) So 419, 839, 1259, 1679, 2099, 2519.

Not a very elogant solution, but it passed a little time.

I assume, some mathemarical genius is going to post an easier way

Just because your voice reaches halfway around the world doesn't mean you are wiser than when it reached only to the end of the bar

Link to comment
Share on other sites

  • 0

If we're looking for n where n divided by x (x being each number 2-10) leaves a remainder of x-1, n+1 divided by each number 2-10 leaves no remainder. To find n+1, we must simply multiply all prime factors of 2-10, excluding any duplicates. This is equal to 2*2*2*3*3*5*7 = 2520, then just subtract one to get the answer of 2519.

  • Upvote 1
Link to comment
Share on other sites

  • 0
I just found a number with an interesting property:

When I divide it by 2, the remainder is 1.

When I divide it by 3, the remainder is 2.

When I divide it by 4, the remainder is 3.

When I divide it by 5, the remainder is 4.

When I divide it by 6, the remainder is 5.

When I divide it by 7, the remainder is 6.

When I divide it by 8, the remainder is 7.

When I divide it by 9, the remainder is 8.

When I divide it by 10, the remainder is 9.

It's not a small number, but it's not really big, either.

When I looked for a smaller number with this property I couldn't find one.

Can you find it?

Let X be the number. From the above properties of X, one can see that,

"X+1" is a multiple of the numbers from 2 to 10. As Bonanova is asking for the smallest number with such properties, "X+1" must be the LCM (least common multiple) of the numbers from 2 to 10 -- which is 2520.

And hence, X = 2520-1 = 2519.

  • Upvote 1
Link to comment
Share on other sites

  • 0

Another variation of the above problem is as follows:

I just found a number with an interesting property:

When I divide it by 2, the remainder is 1.

When I divide it by 3, the remainder is 1.

When I divide it by 4, the remainder is 1.

When I divide it by 5, the remainder is 1.

When I divide it by 6, the remainder is 1.

When I divide it by 7, the remainder is 1.

When I divide it by 8, the remainder is 1.

When I divide it by 9, the remainder is 1.

When I divide it by 10, the remainder is 1.

But when I divide it by 11, the remainder is 0 (just to make the procedure a little bit different).

Can you find it?

Link to comment
Share on other sites

  • 0
Another variation of the above problem is as follows:

I just found a number with an interesting property:

When I divide it by 2, the remainder is 1.

When I divide it by 3, the remainder is 1.

When I divide it by 4, the remainder is 1.

When I divide it by 5, the remainder is 1.

When I divide it by 6, the remainder is 1.

When I divide it by 7, the remainder is 1.

When I divide it by 8, the remainder is 1.

When I divide it by 9, the remainder is 1.

When I divide it by 10, the remainder is 1.

But when I divide it by 11, the remainder is 0 (just to make the procedure a little bit different).

Can you find it?

A number that satisfies all of these properties is:

25201

Link to comment
Share on other sites

  • 0

wrote a simple script - the smallest number is 2519.

here is my way.

$solution = "F";

$x=0;

while($solution eq "F")

{

$x++;

$flag=0;

for($i=1;$i<10;$i++)

{

$j=$i+1;

$y=$x%$j;

if($y != $i)

{$flag=1;}

}

if($flag==0)

{

$solution="T";

print $x,"\n";

}

}

## it is perl.

Link to comment
Share on other sites

  • 0
wrote a simple script - the smallest number is 2519.

here is my way.

$solution = "F";

$x=0;

while($solution eq "F")

{

$x++;

$flag=0;

for($i=1;$i<10;$i++)

{

$j=$i+1;

$y=$x%$j;

if($y != $i)

{$flag=1;}

}

if($flag==0)

{

$solution="T";

print $x,"\n";

}

}

## it is perl.

That seems to take more knowledge of the working mathematics than the other mathematics solutions provided. Guess it just goes to show that math and logic are very much the same animal.

Link to comment
Share on other sites

  • 0

This problem is simple. All you have to do is find the least common multiple of 2,3,4,5,6,7,8,9, and,10. Then you subtract 1 from that number so that it is not divisible by anyone of those numbers. the number is 2519

Link to comment
Share on other sites

  • 0

Can also just use XL VB...took 30 secs...just use "mod" to check the remainder, and see if they add up to 45...

Sub xxxx()

For i = 1 To 100000

Cells(1, 3) = i

If Cells(10, 1) = 45 Then

Exit For

End If

Next i

End Sub

Link to comment
Share on other sites

  • 0
I'm curious ... any of you programmers ever use APL?

It's interpretive, very useful, and very ancient.

Please, you're really showing your age. :-)

After reading the Wikipedia entry and looking at those samples, I'd have to agree that it looks really cool, and totally impractical for any of the work I do. I like the poem at the bottom of the page:

'Tis the dream of each programmer

Before his life is done,

To write three lines of APL

And make the damn thing run.

Perhaps I can make some time on the weekends to learn an arcane, remarkably dense language that I'll never use in real life for the purpose of solving math problems with less code. That I say this in all seriousness is probably a rather sad commentary on my social life.

Link to comment
Share on other sites

  • 0
I just found a number with an interesting property:

When I divide it by 2, the remainder is 1.

When I divide it by 3, the remainder is 2.

When I divide it by 4, the remainder is 3.

When I divide it by 5, the remainder is 4.

When I divide it by 6, the remainder is 5.

When I divide it by 7, the remainder is 6.

When I divide it by 8, the remainder is 7.

When I divide it by 9, the remainder is 8.

When I divide it by 10, the remainder is 9.

It's not a small number, but it's not really big, either.

When I looked for a smaller number with this property I couldn't find one.

Can you find it?

No need of a brute force method...

Just take an LCM (least common multiple) of all the numbers in question and subtract 1 from it!

so the LCM of 2,3,4,5,6,7,8,9,10 = 8x9x7x5 = 2520

Hence, the solutions is 2519!

Link to comment
Share on other sites

  • 0

In the spirit of ATL, I present to you my method, in C#, for calculating the answer by brute force, without taking into account LCM's. I'm curious how much smaller this could be done.

int GetNumber() {

int i=1, n=1; bool r=false;

for (;!r;){if(i%n==(n-1)){n=n%11+1;r=n==11;}else{i++;n=1;}}return i;}

Edited by Duh Puck
Link to comment
Share on other sites

  • 0
I just found a number with an interesting property:

When I divide it by 2, the remainder is 1.

When I divide it by 3, the remainder is 2.

When I divide it by 4, the remainder is 3.

When I divide it by 5, the remainder is 4.

When I divide it by 6, the remainder is 5.

When I divide it by 7, the remainder is 6.

When I divide it by 8, the remainder is 7.

When I divide it by 9, the remainder is 8.

When I divide it by 10, the remainder is 9.

It's not a small number, but it's not really big, either.

When I looked for a smaller number with this property I couldn't find one.

Can you find it?

I think you should include dividing 11 to get a remainder of 10 and dividing 12 to get a remainder of 11

Link to comment
Share on other sites

  • 0

It's the least common multiple of 2, 3, 4, 5, 6, 7, 8, 9, and 10, then minus one, which is 2x2x2x3x3x5x7 minus one, which is 2519.

Edited by babbal
Link to comment
Share on other sites

  • 0
wrote a simple script - the smallest number is 2519.

here is my way.

$solution = "F";

$x=0;

while($solution eq "F")

{

$x++;

$flag=0;

for($i=1;$i<10;$i++)

{

$j=$i+1;

$y=$x%$j;

if($y != $i)

{$flag=1;}

}

if($flag==0)

{

$solution="T";

print $x,"\n";

}

}

## it is perl.

Do people actually use perl? I never have..

In the spirit of ATL, I present to you my method, in C#, for calculating the answer by brute force, without taking into account LCM's. I'm curious how much smaller this could be done.

int GetNumber() {

int i=1, n=1; bool r=false;

for (;!r;){if(i%n==(n-1)){n=n%11+1;r=n==11;}else{i++;n=1;}}return i;}

Well, that is shorter code than mine would be, but mine would be done sooner. I don't feel like writing it, but I could do it! :D I am actually kinda disappointed in myself for not realizing it was a LCM problem... when I was thinking about it in my head, I was considering each sentence seperately and finding a rule for each one. First there was no even numbers allowed (2:1), then the last digit had to be a 9 (10:9), then the second to last digit had to be one less than 3, 6, or 9 (3:2), etc. I came up with 5039 this way... (5039+1)/2 - 1 = 2519, go figure

Link to comment
Share on other sites

  • 0

I really enjoyed this one, as it pressed my math brain a little to figure out the best way to solve it. Alas, I believe I found the answer (assuming it must be positive, of course) ...

2519

Link to comment
Share on other sites

  • 0
Another variation of the above problem is as follows:

I just found a number with an interesting property:

When I divide it by 2, the remainder is 1.

When I divide it by 3, the remainder is 1.

When I divide it by 4, the remainder is 1.

When I divide it by 5, the remainder is 1.

When I divide it by 6, the remainder is 1.

When I divide it by 7, the remainder is 1.

When I divide it by 8, the remainder is 1.

When I divide it by 9, the remainder is 1.

When I divide it by 10, the remainder is 1.

But when I divide it by 11, the remainder is 0 (just to make the procedure a little bit different).

Can you find it?

This time X-1 should be the LCM and hence the number is 2521

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...