# Using LSTM to predict next number [duplicate]

I trying to understand working of LSTM So I'm doing simple code to simulate its action.

x=[[i for i in range(j,j+5)] for j in range(1000)]
x=np.array(x)
x=x.reshape((1000,5,1))
y=[i+5 for i in range(1000)]
y=np.array(y)
y=y.reshape((1000,1,1))


Where x is timeseries like [0,1,2,3,4],[1,2,3,4,5]... so on. Where y is like 5,6... so on.

My Model is

model=keras.Sequential()