Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2006-10-17 05:26:50

chrzasz
Guest

Digits in ratio

(sorry for my bed english)
Is there any way to count how many digit will have: A * B  (a,b - natural numbers, a,b <1000)?
Thank You

#2 2006-10-17 10:05:17

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Re: Digits in ratio

So, both a and b are between 1 and 1000? And you want to know how many different numbers can be made with them?

The smallest a × b = 1 × 1 = 1 and the largest is 1000 × 1000 = 1,000,000

But there are some numbers between 1 and 1,000,000 that won't be made this way, and they will be prime numbers. But some prime numbers can be made this way because, for example, 1 × 5 = 5

The first prime number above 1000 is 1009, and I don't think you can make 1009 by multiplying a × b.

So, my best guess of how many you can create is "1,000,000 minus the number of primes between 1000 and 1,000,000"


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#3 2006-10-17 10:11:55

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: Digits in ratio

You can count how many ways there are of multiplying 2 numbers together to get your chosen number by splitting that number into prime factors.

So, 30 is 2*3*5, 72 is 2³*3², 128 is 2^7, etc.

Then you take the power of each prime factor, add one to each of them and multiply all of those together.

eg. 24 = 2³*3. The prime powers here are 3 and 1, so you do 4*2 = 8, so 24 has 8 factors (1, 2, 3, 4, 6, 8, 12, 24).

Once you've done that, you divide by 2 and that will get you the number of ways 2 numbers can be multiplied together.

In the 24 example, the combinations would be 1*24, 2*12, 3*8 and 4*6.

Note that if your number is square, then the number of factors will be odd. In this case, you just add 1 before dividing by 2.


Why did the vector cross the road?
It wanted to be normal.

Offline

#4 2006-10-17 10:22:41

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Re: Digits in ratio

Oooh, we have two different interpretations of the same question!


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#5 2006-10-17 22:01:06

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: Digits in ratio

If MathsIsFun's interpretation is correct, then I agree with his answer.

Unfortunately, it would be very difficult to make a full list of primes between 1000 and 1000000.

You'd need to divide each of those by every prime between 2 and 1000 to make sure that it doesn't divide into any of them. And for that you'd need to know all the primes between 2 and 1000 even before you started!

Once you did manage to get all of those, you'd probably need to set up a big spreadsheet. Unfortunately, the only spreadsheets that I know only have 65536 rows, so you wouldn't be able to test all the numbers between 1000 and 1000000 unless you kept replacing them. And there's also the possibility that you wouldn't be able to fit all the primes between 2 and 1000 on the 256 columns, in which case it would be even more of a hassle.

Still, if you were persistent enough then it would eventually get you your answer.
And I can't see any other way of doing it that's better. Maybe someone can code something that would do it all for you.


Why did the vector cross the road?
It wanted to be normal.

Offline

#6 2006-10-18 13:30:06

George,Y
Member
Registered: 2006-03-12
Posts: 1,379

Re: Digits in ratio

Hey, I come up with an idea:

Just use two pairs of  convenient numbers both larger or both smaller than them and multiply.

If the two results you get have the same amount of digits, the same for the original pair.

Eg:
123 586
150*600=90000
100*500=50000
So 5 digits

Last edited by George,Y (2006-10-18 13:33:55)


X'(y-Xβ)=0

Offline

#7 2006-10-18 23:12:38

mathsyperson
Moderator
Registered: 2005-06-22
Posts: 4,900

Re: Digits in ratio

Haha, a 3rd interpretation! Excellent!

If that's the problem, then if you were being thorough then you'd need to take logs of A and B and add those together. Round that number down to the nearest integer and add one to that, and you'll have the amount of digits in AB.

But George's method works most of the time as well and is much easier.


Why did the vector cross the road?
It wanted to be normal.

Offline

Board footer

Powered by FluxBB