Wikipedia:Reference desk/Archives/Mathematics/2009 September 20

= September 20 =

Collection of six related primes
The numbers 931981, 941981, 961981, 971981, 991981 and 1001981 are all prime. I have verified that no other number of one to four digits can be put in place of 1981 for this to remain true, and crude estimates of how many five- and six-digit numbers there are for which the six implied numbers will all be primes are 'around two' and 'around eight-and-a-half'. (The formula used for the first approximation is 12000*[3.75/log(9700000)]^6, where 12000=90000/7.5 comes from congruence modulo 30 considerations and the square brackets encloses a value derived from the prime number theorem and consideration of the first three primes.) If anybody can spare the time to generate by program all of the five- and six-digit values one can substitute for 1981, I would appreciate it. I imagine there is a database listing of primes that one can simply search.Julzes (talk) 03:52, 20 September 2009 (UTC)


 * N.B. You don't need 1001981. For a four digit number, say wxyz we can show that 93wxyz, 94wxyz, 96wxyz, 97wxyz and 99wxyz are all prime if and only if wxyz = 1981. In the case of a five digit number then we do need all six cases. For a five digit number, say vwxyz, we find that 93vwxyz, 94vwxyz, 96vwxyz, 97vwxyz, 99vwxyz and 100vwxyz are all prime if and only if vwxyz = 46501.  Dr Dec  ( Talk )    11:07, 20 September 2009 (UTC)


 * Did the sequence "93, 94, 96, 97, 99, 100" come from anywhere in particular? It's not surprising that no other 4-digit numbers can be prefixed by elements of that sequence to make primes, more interesting would be some kind of how many such numbers work for various sequences. Is there any sequence of 6 consecutive prefixes that has a 4-digit number that gives all primes, for example? --Tango (talk) 04:02, 20 September 2009 (UTC)


 * It doesn't look like it. I couldn't even find a single triple of prime numbers of the form 10,000m + n, 10,000(m + 1) + n and 10,000(m + 2) + n where 1 ≤ m ≤ 97 and 0 ≤ n ≤ 9,999. As for pair of the form 10,000m + n and 10,000(m + 1) + n where 1 ≤ m ≤ 98 and 0 ≤ n ≤ 9,999, well, there were 10,477 of such prime pairs.   Dr Dec  ( Talk )    12:22, 20 September 2009 (UTC)

I would say I just took a kind of numerological curiosity in all of the values beginning with 11981 and worked upward. You could say I just stumbled upon it. Obviously the answer to your other question is no by consideration modulo 3. I'm in the midst of formulating another nice question beginning at 100 and working backward, but one could come up with all sorts of related questions. You can sort of figure out what the question I am trying to formulate is if I say that 9 is the first value in sequence, and 1981 is the sixth. Julzes (talk) 04:21, 20 September 2009 (UTC)


 * Sorry, but I don't understand. I'm probably being quite dense now, but how does reduction modulo 3 tell us anything? For example 10,000m + n = m + n (mod 3). And m + n = 0, 1, or 2 (mod 3). I can't see why any result comes from this.   Dr Dec  ( Talk )    12:51, 20 September 2009 (UTC)
 * A number is divisible by three when the sum of the digits is divisible by 3. (A key part of the standard mathematical toolbox for any base-10 numerologist.) So if you make a sequence of three numbers by increasing the same digit by 1 each time, then one of them must be divisible by three. Staecker (talk) 14:02, 20 September 2009 (UTC)
 * Ah! I see... That explains why I couldn't find a triple of prime numbers of the form 10,000m + n, 10,000(m + 1) + n and 10,000(m + 2) + n where 1 ≤ m ≤ 97 and 0 ≤ n ≤ 9,999; one of them would always be divisable by 3.  Dr Dec  ( Talk )    14:27, 20 September 2009 (UTC)

The first six members in the sequence would be 9, 67, 67, 787, 1981 and 1981 (1009 is prime; 10067, 9967 and 9767 are prime; 100787, 99787, 97787 and 96787 are prime; and then the above is the first that allows 94 as a prefix and it also allows 93. The sequence of prefixes continues 91, 90, 87, 85, 84, 82, 79, 78, 76, 72, 69, etc., with modulo 7, 11 and 13 considerations first necessarily coming in at 95 (taking 88 and 74 off), 92 (81 and 70) and 88 (75), respectively.  How would we expect the sequence to grow, rather than asking what its precise values are (the next few terms would be nice, but I expect the growth to be pretty fast)?  What does the sequence starting with prefixes of 0 (no prefix), 1, 3, 4, 6, 7, 9, 10, 13, 15, 16, etc., look like?  This is probably a more natural question.  Is there a good base-independent related question is also something I wonder about.Julzes (talk) 06:17, 20 September 2009 (UTC)


 * For 5 digits, the only answer is starting 93,94, etc. is
 * 9346501,9446501,9646501,9746501,9946501,10046501.
 * For 6 digits, there are 4 solutions:
 * 93132667,94132667,96132667,97132667,99132667,100132667
 * 93338149,94338149,96338149,97338149,99338149,100338149
 * 93484393,94484393,96484393,97484393,99484393,100484393
 * 93740131,94740131,96740131,97740131,99740131,100740131

70.90.174.101 (talk) 09:01, 20 September 2009 (UTC)

Hmmm. Then 132667 is the only number of six or fewer digits that also gives a prime when 91 is prefixed, and to get 90 also prefixed to get a prime seven digits are needed at the very least. My 0, 1, 3, etc., alternative question yields analogously a sequence starting 2, 3, 7, 7, 7, 229, and then what?Julzes (talk) 09:31, 20 September 2009 (UTC)


 * You get to 91 with 2824117 and no other 7 digit sequences. For 8 digits you get 91 with 02374819, 07184533, 08614087, 67173973, and 84167761.  In neither case do you ever get to 90.  Dragons flight (talk) 14:25, 20 September 2009 (UTC)


 * The 14th term in your original sequence is probably 9955031915073901. It gives a prime when one of 78, 79, 82, 84, 85, 87, 90, 91, 93, 94, 96, 97, 99, 100 is prefixed. PrimeHunter (talk) 01:33, 21 September 2009 (UTC)

Thanks, all. PrimeHunter, how on Earth did you find that and what are the eighth through thirteenth terms? I'm surprised to find that the number of digits grows as slowly as indicated, too. Is there a good way to estimate the size of terms? Also, just looking at the 1981 case, I'm wondering if there is any sequence of four or fewer digits other than it that produces primes for five of the six prefixes (we've ruled out consecutive ones for numbers without leading zeros). I'm going to look into that the way I have been (almost by hand, with a primality testing module).Julzes (talk) 03:10, 21 September 2009 (UTC)

Correction: Dr. Dec only considered four-digit numbers (937, 947, 967, 977 and 997 are prime). I'll have to limit my search to four-digit sequences if I'm hoping to find 1981 unique in the way I've suggested.Julzes (talk) 03:49, 21 September 2009 (UTC)

0889 turns out to be the first value that's prime for five of the six prefixes (composite for 97).Julzes (talk) 04:23, 21 September 2009 (UTC)

Ok. 3367 gives primes for prefixes 94, 96, 97, 99 and 100, so what I said earlier was not correct. Here is a problem then (which unfortunately won't have my set of six primes as a solution, but might be interesting/challenging): What is the first string of eight consecutive numbers such that there is a unique four-digit value (or string, for a slightly different problem) that can be appended to five of them to make primes, and which can actually be appended to the maximum of six to make primes?Julzes (talk) 05:59, 21 September 2009 (UTC)


 * There is a reason for my username. The search took 10 cpu minutes after adapting my old prime pattern finder. But it was not designed for this and setting it up to make exhaustive searches for a lot of sequence terms would require more manual time than I'm willing to use. It would require separate source modifications and recompilation for each combination of sequence term and number of digits it searches for this problem. Finding 14 primes with a 16-digit end was lucky. 18 digits would have seemed more likely. An expected chance of solutions below a given size can for example be computed with help from a formula at but it's a little complicated and I didn't do it. The 14th term of your new sequence is probably 1989530586646177 which gives a prime with prefix 0, 1, 3, 4, 6, 7, 9, 10, 13, 15, 16, 18, 21, 22. That was also lucky. PrimeHunter (talk) 15:21, 21 September 2009 (UTC)
 * I confirmed it's the smallest and submitted it to http://primes.utm.edu/curios/page.php/1989530586646177.html. PrimeHunter (talk) 13:27, 23 September 2009 (UTC)


 * Here is a variation with no jumps needed to avoid small prime factors like 3 and 7. Prefix d d's to 20674943797 for any digit d. This gives 10 primes. PrimeHunter (talk) 14:26, 23 September 2009 (UTC)

Normal approximation to the binomial with continuity correction
So, I am asked to use the normal approximation to the binomial and use the continuity correction with it to make it more accurate. The way my textbook describes how to use the continuity correction is:

The best way to determine whether to add or subtract is to draw a picture like Figure 4.26.

That is, draw the graph of the normal approximation along with a histogram of the binomial distribution. In other words, calculate the binomial distribution EXACTLY so you will know which correction, adding or subtracting 0.5, is closer to the actual value. Is there some way that is not stupid to know how to do the continuity correction? StatisticsMan (talk) 19:46, 20 September 2009 (UTC)


 * The graph doesn't need to be exact. You just need to work out roughly where the point you are interested in is. You can work out the mean and standard deviation of the binomial distribution and that is enough for a rough sketch. In fact... it's been about 5 years since I've done this so I'm not sure, but don't you just need move further away from the mean? If it is less than the mean, subtract 0.5, if it is more, add 0.5. I'm going to have to go and look this up now... --Tango (talk) 20:00, 20 September 2009 (UTC)
 * According to our article, continuity correction, you always add... Is it that you always expand the area of interest? Add for a less than, subtract for a more than? Now I'm getting myself thoroughly confused, so I'll let someone else take over! --Tango (talk) 20:06, 20 September 2009 (UTC)
 * It doesn't say you should always add; quite the contrary. It considers only the case in which you add, but the case in which you subtract should be clear if you just apply common sense.  Say you want P(X &ge; 8).  That's the same as P(X > 7).  So use 7.5. Michael Hardy (talk) 20:09, 22 September 2009 (UTC)

Has some information been deleted from this post? I can't understand the original post as it is, and I can't see how Tango understands enough to make a reply. Have you two discussed this previously, on a talk page for example? Dr Dec ( Talk )    20:33, 20 September 2009 (UTC)


 * First, imagine I am talking about a very good approximation here. When the normal probability density function is increasing, then the rectangle (representing binomial dist probability of some certain value) will be above the graph on the left side and the graph will be above the rectangle on the right side.  So, to approximate the probability of some number happening, you want to go up an extra .5 to grab the full area of the rectangle you are trying to approximate.  On the other hand, if it is decreasing, I think it would go the opposite and you'd subtract .5.  Now, this seems to answer my question, but it's not always going to be so simple and such a good approximation as this.  What if the normal graph completely contains some rectangle?  It could increasing or decreasing at this point.
 * No, we have not talked about this elsewhere and no nothing was deleted. StatisticsMan (talk) 21:49, 20 September 2009 (UTC)
 * I see... I think I understand what you were getting at now. Thanks!  Dr Dec  ( Talk )    22:00, 20 September 2009 (UTC)
 * If I recall correctly from many years ago, whether you add or subtract depends on the exact wording of the question being asked. This is why a little sketch (just of the two rectangles in the binomial histogram each side of the chosen point on the normal curve) will aid understanding of whether to add or subtract the correction.  Neither the normal nor the binomial distribution has any turning points other than the mean, so both curve and histogram are increasing to the left of the mean and decreasing to the right.  There is no need to do any calculations for the sketch.  It is just an aid to careful thought about the wording of the question.    D b f i r s   07:16, 21 September 2009 (UTC)


 * Yea, that makes sense. When the books says to draw a figure like Figure whatever, they do not mean to do an exact drawing.  They just mean, draw a little figure to see the basic shape.  In general, a question that asks for P(X <= a) is one where you'll do P(X <= a + .5) since you're missing out on the right half of the rectangle corresponding to a in the binomial distribution.  If it asks P(X >= a), then you do P(X >= a) since you are missing out on half the rectangle corresponding to a in the binomial distribution.  My previous thoughts, above, are not correct.  Thanks for the help. StatisticsMan (talk) 22:30, 23 September 2009 (UTC)

When a random variable X is known to assume only integer values, and A is a fixed integer, then the probability that X &le; A is equal to the probability that X < A+0.5 and the probability that X &ge; A is equal to the probability that X > A&minus;0.5. The idea is to distinguish between &le; and <. Bo Jacoby (talk) 18:26, 24 September 2009 (UTC).