News for hackers. Stuff that matters.
Re:The Easiest Hard Problem (2002) by nick-parker on Friday August 07, 2015 @02:01PM (#10023925)
It's an interesting heuristic, but I think your limitation that it be less than the square of the Nth prime is a case of overfitting.

Here's a list of results for the first N primes, for different Ns: 3: 7 4: 11 5: 13 6: 17 7: 107 8: 41 9: 157 10: 1811 11: 1579 12: 18859 13: 95533 14: 310469 15: 1995293 16: 208303 17: 2396687 18: 58513111 19: 299808329 20: 2933961157 21: 3952306763 22: 33298242781 23: 115405393057

I just wrote a script to brute force all combinations here, so the 24th iteration got very slow, but of all those the nonprime ones are n=23, 19, 18, 16, 14, and 13.

So, your rule appears to hold true as long as N is less than the cube of the Nth prime. The actual rule is probably more complex than a simple power, considering 83^5 is far less than the result in N=23.

I think I'll play with this a bit more this evening then ping some mathematician friends about it. They always love playing with weird properties of primes.

Re:The Easiest Hard Problem (2002) by phkahler on Friday August 07, 2015 @02:14PM (#10024000)
>> It's an interesting heuristic, but I think your limitation that it be less than the square of the Nth prime is a case of overfitting.

Maybe, but the result is obviously guaranteed to not be a multiple of any of the N primes. Since the smallest factor has to be greater than N, that means prime for up to N^2 (or (N+1)^2 I suppose).

Re:The Easiest Hard Problem (2002) by phkahler on Friday August 07, 2015 @04:18PM (#10024746)
Confused N for P_n in that.