Prime Cell Phones

  • #1
Char. Limit
Gold Member
1,208
22
I was playing with Wolfram|Alpha, and I typed in my ten-digit phone number. And it was prime! I have a prime cell phone number!

Of course, I tried this with other numbers... my SSN isn't prime, and neither is my dad's phone number. My seven-digit phone number can be divided by two square numbers... so it's really not prime...

But I still find the prime phone number interesting.

Question 1:

Do any of you have prime phone numbers? (You don't have to say what the number is)

Question 2:

Does anyone know the probability of a ten-digit phone number being prime?
 

Answers and Replies

  • #2
Office_Shredder
Staff Emeritus
Science Advisor
Gold Member
2021 Award
5,075
1,088
The distribution of primes is approximately x/ln(x) of the numbers up to x are prime. So numbers that are smaller than 1010, gives us 4.3 times 108 primes. So the odds of being prime are about 4.3%

This is a rough estimate of course

My phone number is even, so there you go
 
  • #3
MotoH
31
2
I feel like optimus prime when I use my phone. Does that count?
 
  • #4
DaveC426913
Gold Member
20,781
4,266
The distribution of primes is approximately x/ln(x) of the numbers up to x are prime. So numbers that are smaller than 1010, gives us 4.3 times 108 primes. So the odds of being prime are about 4.3%

Correct me if I'm wrong but that's all numbers down to 1 digit.

What we want is the probability of only 10-digit numbers.
 
  • #5
CRGreathouse
Science Advisor
Homework Helper
2,824
0
Correct me if I'm wrong but that's all numbers down to 1 digit.

What we want is the probability of only 10-digit numbers.

They're about the same. In general x/log x is a slightly better estimate of the numbers around x than the numbers 1 to x, though -- compare x/log x to Li(x) to see why.


But as it happens there are 404204977 10-digit prime numbers, so if all 10-digit numbers were valid phone numbers then the probability would be exactly 4.04204977%.

It looks like there are 5,702,328,000 valid NANPA (US) phone numbers. Such phone numbers can't start with 1, so that will change the probability slightly. (The other restrictions shouldn't change the probability much.)
 
Last edited:
  • #6
Max Faust
73
0
How can I check this (without blowing any brain fuses over too complicated mathematics)?
 
  • #7
CRGreathouse
Science Advisor
Homework Helper
2,824
0
How can I check this (without blowing any brain fuses over too complicated mathematics)?

Generate 10-digit numbers at random and check if they're prime.

I generated a million random numbers from 2000000000 to 9999999999, of which 4.0785% were prime. It took about 5 seconds in Pari:
Code:
test(lim)=sum(i=1,lim,isprime(random(10^11-10^10*2)+10^10*2))/lim*1.
100*test(1e6)
 
  • #8
Max Faust
73
0
Heh... I'm sure that looks *yawningly* simple to you, but I am a mathematical illiterate, so I really need to be gently taken in hand and shown the way here. Is there a place where I can type in my actual phone number and have it answered within seconds?
 
  • #9
CRGreathouse
Science Advisor
Homework Helper
2,824
0
Heh... I'm sure that looks *yawningly* simple to you, but I am a mathematical illiterate, so I really need to be gently taken in hand and shown the way here. Is there a place where I can type in my actual phone number and have it answered within seconds?

Sure, http://www.usi.edu/science/math/prime.html [Broken] .

Alternately, download Pari/GP (click on "Windows binary" if you're on Windows) which lets you check more than one at a time, for example with the above program.
 
Last edited by a moderator:
  • #10
Max Faust
73
0
Sure, http://www.usi.edu/science/math/prime.html [Broken]

OK, it can be divided by 2... which I suppose is as far away from a prime as you can get... but then again, would any 10 digit number that ends with a 0 be a prime?
 
Last edited by a moderator:
  • #11
DaveC426913
Gold Member
20,781
4,266
... would any 10 digit number that ends with a 0 be a prime?

No. A number ending in zero is divisble by 2.

Sure, http://www.usi.edu/science/math/prime.html [Broken] .

OK, it can be divided by 2... which I suppose is as far away from a prime as you can get...
[ribbing]
If you had to check the link to find out whether your even number is prime, then you weren't kidding about being mathematically illiterate, were ya?
[/ribbing]
 
Last edited by a moderator:
  • #12
Max Faust
73
0
No kidding! But are all numbers that end in a zero also divisble by five?
 
  • #13
CRGreathouse
Science Advisor
Homework Helper
2,824
0
OK, it can be divided by 2... which I suppose is as far away from a prime as you can get... but then again, would any 10 digit number that ends with a 0 be a prime?

No prime ends with 0, 4, 6, or 8; only one prime ends with 2; only one prime ends with 5.

In fact, no prime ends with 0 in *any* composite base, and the only prime ending with 0 in a prime base is the prime itself (which is "10").
 
  • #14
waht
1,497
4
I checked my number but it's not a prime, however it has four independent Pythagorean triples.

That is it has 4 sets of:

Phone #^2 = x^2 + y^2

where x,y are integers

What are the odds on that?
 
Last edited:
  • #15
CRGreathouse
Science Advisor
Homework Helper
2,824
0
What are the odds on that?

Asymptotically, almost all numbers are composite and almost all numbers cannot be expressed as the sum of two squares. But, trivially, all squares can be expressed as the sum of two squares, so it's just a question of how many times. This varies, of course, depending on how you count it. See
http://mathworld.wolfram.com/SumofSquaresFunction.html
 
Last edited:
  • #17
Max Faust
73
0
Heh... y'all make math sound sexy now. Maybe I'll have to sign up for some tutoring just to be able to follow the conversation.
 
  • #18
Char. Limit
Gold Member
1,208
22
Er... Jack... everyone can see your prime phone number. I'm not sure if you want that information to be kept hidden or not...

Is that true, that every square number can be written as the sum of two squares?

(Wait, never mind, I proved that myself a while ago... I don't need an answer there...)

All even phone numbers are composite. All phone numbers ending in five are composite (as there is no area code 000).

But the only way to calculate all possible prime phone numbers is through checking each number, isn't it?

Approximations are, after all, approximations.
 
  • #19
Jack21222
187
1
Er... Jack... everyone can see your prime phone number. I'm not sure if you want that information to be kept hidden or not...

There are 226 phone numbers on that page.

If somebody wants to go through all 226 of them to try and reach me, they're free to do so.
 
  • #20
CRGreathouse
Science Advisor
Homework Helper
2,824
0
It also gives away your state, city, and carrier (Global Crossing Local Services, unless you transferred the number).

I'm clearly not worried about privacy online, considering that I use my real name here. But some people are...
 
  • #21
CRGreathouse
Science Advisor
Homework Helper
2,824
0
But the only way to calculate all possible prime phone numbers is through checking each number, isn't it?

No -- but since there are some very small-scale rules like those on connection 555, it's probably the fastest.

Well, actually, I'm not sure now that I think about it. If you subtract those off by calculating them directly, the gaps between the remaining blocks are small enough that the Meissel-Lehmer algorithm could easily be competitive.
 
  • #22
CRGreathouse
Science Advisor
Homework Helper
2,824
0
Heh... y'all make math sound sexy now.

That's only `cause it is.ɦ
 
  • #24
TheStatutoryApe
203
4
Lets see... Char's name has a 'Z', his phone number is prime, he's 17, and he lives in Canada. This should make my stalking him much simpler.
 
  • #25
Char. Limit
Gold Member
1,208
22
Except I don't live in Canada...
 
  • #26
Kajahtava
99
1
Okay, I've got an algorithm running right now which should give me the amount of ten digit primes, if any one has a faster computer than I and runs scheme, or has some pointers on reducing complexity:

http://codepad.org/pD8jMxnp

I have no idea how long this will take, I made the algorithm to compute the list of primes a while ago, hence it has comments. In theory it should compute a list of all primes smaller than 999999999 and then count the the amount that are higher than 1000000000.
 
  • #27
Jimmy Snyder
1,031
19
Unfortunately, my phone number is not a prime. But the good news is that my age, 59, is a prime, or will be for a little while more. Next month my age won't be a prime any more, although I can't imagine how 59 will get split up. For my birthday, my wife will take me out for prime rib, That is, USDA prime beef. That's number 1 with me even though 1 is not actually a prime. I'm in the prime of life too, what a coincidence. They call it prime time and it shows what can come of a society that primes the pump by educating its young. Life is grand, the prime rate is low, the Prime (no pun intended) Minister is ministering out there by the prime meridian, my primary care physician is in good health, my house is in a prime location and I'm not a prime suspect in any investigation.
 
Last edited:
  • #28
Borek
Mentor
28,998
3,659
Is that true, that every square number can be written as the sum of two squares?

Let me guess what you mean...

[tex]4 = 2^2 = (\sqrt 1)^2 + (\sqrt 3)^2[/tex]

Actually, I think same holds for every number. Like

[tex]7 = 2^2 + (\sqrt 3)^2[/tex]

7 is a prime, which makes the result even more interesting... But then,

[tex]7 = (\sqrt 7)^2[/tex]

so 7 is a square.
 
Last edited:
  • #29
Kajahtava
99
1
I think a square number means a number whose root is an integer.

Which makes it true, because 0 is a square number by the above definition.
 
  • #30
Borek
Mentor
28,998
3,659
Technically you are right, but allowing zeros makes it trivial (every square number equals itself is hardly surprising).

Pythagorean triples (with three positive integers) are much more interesting.
 
  • #31
TheStatutoryApe
203
4
Except I don't live in Canada...

Its not nice tricking people into thinking that you live in Canada.
 
  • #32
Vasara
8
0
Tangentially related: both my birthday and month of birth are prime and together they form a http://en.wikipedia.org/wiki/Sexy_prime" [Broken] pair. Yay.

None of my phone numbers are prime though.
 
Last edited by a moderator:
  • #33
CRGreathouse
Science Advisor
Homework Helper
2,824
0
Tangentially related: both my birthday and month of birth are prime and together they form a http://en.wikipedia.org/wiki/Sexy_prime" [Broken] pair.

May 11th, July 13th, November 5th, or November 17th, then.
 
Last edited by a moderator:
  • #34
CRGreathouse
Science Advisor
Homework Helper
2,824
0
Okay, I've got an algorithm running right now which should give me the amount of ten digit primes, if any one has a faster computer than I and runs scheme, or has some pointers on reducing complexity:

http://codepad.org/pD8jMxnp

I have no idea how long this will take, I made the algorithm to compute the list of primes a while ago, hence it has comments. In theory it should compute a list of all primes smaller than 999999999 and then count the the amount that are higher than 1000000000.

I have that number already -- 404204977. But I don't have the number that excludes area codes starting with 1, certain numbers with connection 555, etc.

[tex]7 = (\sqrt 7)^2[/tex]

so 7 is a square.

"Square" is surely used in its number theory sense here, as Kajahtava suggests.
 
  • #35
Mentallic
Homework Helper
3,798
94
What if where you live they don't have 10 digit phone numbers?
Well anyway, this 8 digit number of mine is even so... I'm one of the special ones that has a composite phone number.
 

Suggested for: Prime Cell Phones

  • Last Post
Replies
12
Views
3K
  • Last Post
Replies
32
Views
13K
  • Last Post
Replies
9
Views
2K
  • Last Post
Replies
29
Views
12K
  • Last Post
Replies
33
Views
5K
Replies
4
Views
3K
Replies
17
Views
2K
Replies
30
Views
13K
  • Last Post
Replies
25
Views
11K
  • Last Post
Replies
17
Views
4K
Top