# How I can predict the next number in a sequence with a neural network?

I've been dabbling with machine learning and neural networks (namely, resnet50) for a few months now, mostly doing image recognition. I am currently trying to make a program that, given a string of numbers as input, can predict the next number in this sequence. For example, the input could be 1, 2, 3, 4 and the output should be 5.

I read something that said this could be done with a multilayer perceptron neural net, but that didn't elaborate much.

Any ideas, or links to tutorials/code?

• Sequence prediction is very often approached with recurrent neural networks (RNNs). A specific kind of RNN, LSTMs, would be a good choice. – Mathias Müller Jan 29 at 11:20