Post
Topic
Board Bitcoin Discussion
#66
by
kachev87
on 21/05/2023, 12:48:46 UTC
I wrote a small python script to try to predict the next number of the #66 address

from sklearn.linear_model import LinearRegression

# Training numbers
train_sequence = [1,3,7,8,21,49,76,224,467,514,1155,2683,5216,10544,26867,51510,95823,198669,357535,863317,1811764,3007503,5598802,14428676,33185509,54538862,111949941,227634408,400708894,1033162084,2102388551,3093472814,7137437912,14133072157,20112871792,42387769980,100251560595,146971536592,323724968937,1003651412950,1458252205147,2895374552463,7409811047825,15404761757071,19996463086597,51408670348612,119666659114170,191206974700443,409118905032525,611140496167764,2058769515153876,4216495639600700,6763683971478124,9974455244496707,30045390491869460,44218742292676575,138245758910846492,199976667976342049,525070384258266191,1135041350219496382,1425787542618654982,3908372542507822062,8993229949524469768,17799667357578236628,30568377312064202855]

# Forming the training data and target values
X_train = [[2**i] for i in range(len(train_sequence))]  # Powers of 2
y_train = train_sequence

# Creating and training the model
model = LinearRegression()
model.fit(X_train, y_train)

# Predicting the next number
next_number = model.predict([[2**len(train_sequence)]])
next_number_decimal = int(next_number)  # Converting the predicted number to decimal
next_number_hex = hex(next_number_decimal)  # Converting the predicted number from decimal to hexadecimal

print("The next number in the sequence (hexadecimal) is:", next_number_hex)
print("The next number in the sequence (decimal) is:", next_number_decimal)


If helpfull 1N97k1LdzjwdG6riN9ksJBhgDQyajV14GU