Jenny's phone number is 867-5309, according to the song. Here are some problems about the number 8675309.
1. 8675309 is prime. How many prime phone numbers are there if phone numbers are 7 digits and cannot start with 0?
2. How many prime phone numbers are there if phone numbers are 7 digits and can start with 0?
3. 8675309 is the 582161st prime, and 582161 is prime, too. Therefore, 8675309 is a superprime
. How many superprimes are ≤8675309?
4. 8675311 is prime. Therefore, 8675309 and 8675311 are twin primes. How many twin prime pairs (n, n+2) are there such that n≤8675309?
This seems like more of a programming challenge (e.g. something one might encounter on Project Euler) than a real numbers puzzle. I'm not aware of a way to really "solve" it other than to dump a table of primes into some kind of software and script up a solution.
First I'll throw out the following, if only because some people might find it interesting.
pi(x) is defined as the number of primes less than or equal to x. The Prime Number Theorem tells us that pi(x) can be approximated by x / [ln(x) - 1]. (There are better approximations, this is just a simple one.)
So the approximation to question #2 is just pi(9,999,999) ~= 9,999,999 / [ln (9,999,999) - 1] ~= 661,459.
The approximation to question #1 is just the answer to 2 minus pi(999,999) ~= 583,429.
I ended up pulling a list of primes into Excel and quickly found the following answers to all four questions:
1) 586,081 (reasonably close to the approximation above)
2) 664,579 (same)
Posted by tomarken
on 2014-02-26 14:41:24