Live data from Hacker News

Neural Networks and Primes

repl.it

11–20 of 21 posts

Re: Neural Networks and Primes

#11
post #4

This seems extremely contrived and at best misleading, if it is meant to be more than an exercise to teach someone to code. If there were a function that could produce subsets of primes in a sequence via a C-infinity function (as you are doing via your trained neural net), then it is extremely, extremely unlikely that all of the known pseudo-randomness properties of prime numbers and their k-point functions are true.…

This is from a 16 year old (I trust your homework was at least as good at that age)...

Re: Neural Networks and Primes

#12
post #4

This seems extremely contrived and at best misleading, if it is meant to be more than an exercise to teach someone to code. If there were a function that could produce subsets of primes in a sequence via a C-infinity function (as you are doing via your trained neural net), then it is extremely, extremely unlikely that all of the known pseudo-randomness properties of prime numbers and their k-point functions are true.…

I agree this approach is unlikely to be fruitful. I think the author doesn’t realize how frequent primes are (for example, primes are a lot denser than square numbers).

If you do the minimal to avoid obvious non-primes, avoiding numbers divisible by 2 or 5, you can expect to find a N-digit prime checking about N random N-digit numbers (1), so finding a 4,000-digit one after experimenting for a while doesn’t indicate ability to find primes.

(1) the density of primes around 10ⁿ is about 1/ln(10ⁿ), so you expect to find a prime after ln(10ⁿ) random samples, and

  ln(10ⁿ) = n * ln(10) ≈ 2.3 * n
Avoiding even numbers and multiples of five gives you back a factor of 2.5, more than offsetting that factor of ln(10)

Re: Neural Networks and Primes

#13
post #9

An interesting idea. A paper from last year showed that neural networks and rational functions efficiently approximate one another [1]. [1] https://arxiv.org/abs/1706.03301

"A paper from last year showed that neural networks and rational functions efficiently approximate one another"

I recently came up with a hand waving session demonstrating that sinks and toilets are able to drain water, provided that they are not blocked by a neural network. However I could only get it to work for the degenerative neural network and not the pretty silly type and certainly not a rational one.

Re: Neural Networks and Primes

#14
post #8

”to search for prime number sequences, sequences of numbers with many prime numbers along them, the classic example being the Mersenne primes, of the form 2^n - 1.” Many? The 34th mersenne prime has n > 1,000,000, the 47th n > 40,000,000 ( https://www.mersenne.org/primes/ ), we know of only 50 ones, and that might even be all of them (we don’t even know whether infinitely many exist)

The OP is from a 16 year old. I trust you were worrying about MPs when you were 16 ...

Re: Neural Networks and Primes

#15

Since primes are themselves a deep structure of the integers it would not seem possible for a neural network to offer any advantage. The concept of prime "finding" being searching the larger space of positive integers for primes is misleading. Primes are themselves the factors of larger, non-prime numbers. In chess, the search space is a tree of moves, and the algorithm eliminates some subtrees as being irrelevant to…

Its lovely to see you engaging with a 16 year old person with a discussion about primes. Crack on.

Re: Neural Networks and Primes

#16
post #13
post #9

An interesting idea. A paper from last year showed that neural networks and rational functions efficiently approximate one another [1]. [1] https://arxiv.org/abs/1706.03301

"A paper from last year showed that neural networks and rational functions efficiently approximate one another" I recently came up with a hand waving session demonstrating that sinks and toilets are able to drain water, provided that they are not blocked by a neural network. However I could only get it to work for the degenerative neural network and not the pretty silly type and certainly not a rational one.

But did you write it up and put it on arXiv?

Re: Neural Networks and Primes

#17
post #12
post #4

This seems extremely contrived and at best misleading, if it is meant to be more than an exercise to teach someone to code. If there were a function that could produce subsets of primes in a sequence via a C-infinity function (as you are doing via your trained neural net), then it is extremely, extremely unlikely that all of the known pseudo-randomness properties of prime numbers and their k-point functions are true.…

I agree this approach is unlikely to be fruitful. I think the author doesn’t realize how frequent primes are (for example, primes are a lot denser than square numbers). If you do the minimal to avoid obvious non-primes, avoiding numbers divisible by 2 or 5, you can expect to find a N-digit prime checking about N random N-digit numbers (1), so finding a 4,000-digit one after experimenting for a while doesn’t indicate…

The author is 16 and does not ask for quarter. This post is not going to set the world on light but it is a damn good effort.

"If you do the minimal to avoid obvious non-primes" - I take it that is the prompt for "I'm having a laugh" (rofl, lol etc)

Re: Neural Networks and Primes

#18
post #16
post #13

Earlier quoted context omitted.

"A paper from last year showed that neural networks and rational functions efficiently approximate one another" I recently came up with a hand waving session demonstrating that sinks and toilets are able to drain water, provided that they are not blocked by a neural network. However I could only get it to work for the degenerative neural network and not the pretty silly type and certainly not a rational one.

But did you write it up and put it on arXiv?

I'm an engin ... err technic ... OK a muckerabouterer. Not a scientist.

Re: Neural Networks and Primes

#19
post #5

Hi all, Repl.it employee here. It's worth noting that the author of the guest blog post took on this project as part of his EPQ, or Extended Project Qualification, an exploratory project undertaken by some high schoolers (equivalent) in the UK. Repl.it took no part in the origins or the directions of his work; Ollie just chose Repl.it as his tool of choice. He learned the concepts, tools, and code on his own. Regardl…

honestly, then y'all are mostly responsible. If you are going to have a younger student do a guest blog post, you should make sure that the project makes sense technically, or at least is not silly. What if the student tried to train a neural net to build a perpetual motion machine and reported their progress on that? Would you have posted it? That project would be about the same level of silliness as what is reported here. I don't blame them at all for doing a silly thing, but I surely blame you for making it your guest blog post.

Re: Neural Networks and Primes

#20
post #11
post #4

This seems extremely contrived and at best misleading, if it is meant to be more than an exercise to teach someone to code. If there were a function that could produce subsets of primes in a sequence via a C-infinity function (as you are doing via your trained neural net), then it is extremely, extremely unlikely that all of the known pseudo-randomness properties of prime numbers and their k-point functions are true.…

This is from a 16 year old (I trust your homework was at least as good at that age)...

I completely missed that this person is 16. This is really impressive.
Post reply on HN