use this code to "predict"
Hexadecimal: 0x11f774e94c1ec000 # puzzle 62 0x363d541eb611abee
Hexadecimal: 0x7d556bf6f89d2c00 # puzzle 63 0x7cce5efdaccf6808
Hexadecimal: 0xe7655f0b50acf800 # puzzle 64 0xf7051f27b09112d4
Hexadecimal: 0x1a78fd44662532000 # puzzle 65 0x1a838b13505b26867
Hexadecimal: 0x290860e0f31602000 # puzzle 66 ?
Yep. Some results get kinda close, others not much.
Could accuracy increase as we append new keys to the sequence?
Can we improve this script somehow?
spline_rep = splrep(x_values_known, sequence_decimal, k=2)
I've messed with other values for
k but
2 seems to yield better results.
Index 3: Predicted = 0xd, Actual = 0x8, Error = 5.0
Index 4: Predicted = 0x5, Actual = 0x15, Error = 15.83333333333334
Index 5: Predicted = 0x30, Actual = 0x31, Error = 0.2857142857142918
Index 6: Predicted = 0x5c, Actual = 0x4c, Error = 16.04901960784312
Index 7: Predicted = 0x63, Actual = 0xe0, Error = 124.75357443229606
Index 8: Predicted = 0x202, Actual = 0x1d3, Error = 47.404329004328815
Index 9: Predicted = 0x31c, Actual = 0x202, Error = 282.866702978386
Index 10: Predicted = 0x13c, Actual = 0x483, Error = 838.5322535426649
Index 11: Predicted = 0x9e5, Actual = 0xa7b, Error = 149.13061026670766
Index 12: Predicted = 0x1403, Actual = 0x1460, Error = 92.41323240818747
Index 13: Predicted = 0x2241, Actual = 0x2930, Error = 1774.144396004227
Index 14: Predicted = 0x4a1b, Actual = 0x68f3, Error = 7895.604944862127
Index 15: Predicted = 0xd8f3, Actual = 0xc936, Error = 4029.671642258196
Index 16: Predicted = 0x14745, Actual = 0x1764f, Error = 12041.382349990992
Index 17: Predicted = 0x2784f, Actual = 0x3080d, Error = 36797.025408181595
Index 18: Predicted = 0x59719, Actual = 0x5749f, Error = 8826.371450069128
Index 19: Predicted = 0x8b61a, Actual = 0xd2c55, Error = 292410.36592774664
Index 20: Predicted = 0x1af328, Actual = 0x1ba534, Error = 45579.312763758004
Index 21: Predicted = 0x30fdc8, Actual = 0x2de40f, Error = 203193.17374296952
Index 22: Predicted = 0x4360b7, Actual = 0x556e52, Error = 1183130.437051029
Index 23: Predicted = 0x955cee, Actual = 0xdc2a04, Error = 4640021.909114862
Index 24: Predicted = 0x1ce3cea, Actual = 0x1fa5ee5, Error = 2892282.0998125
Index 25: Predicted = 0x3b79f62, Actual = 0x340326e, Error = 7826676.155909941
Index 26: Predicted = 0x4992721, Actual = 0x6ac3875, Error = 34804051.331749916
Index 27: Predicted = 0xc998ee1, Actual = 0xd916ce8, Error = 16244230.842530549
Index 28: Predicted = 0x181a56c4, Actual = 0x17e2551e, Error = 3670438.391939521
Index 29: Predicted = 0x25955523, Actual = 0x3d94cd64, Error = 402618432.6683471
Index 30: Predicted = 0x82c6e33c, Actual = 0x7d4fe747, Error = 91683829.12309027
Index 31: Predicted = 0xd6239bac, Actual = 0xb862a62e, Error = 499185022.823071
Index 32: Predicted = 0xe9b22d07, Actual = 0x1a96ca8d8, Error = 3216669648.649395
Index 33: Predicted = 0x371532851, Actual = 0x34a65911d, Error = 653104948.3604355
Index 34: Predicted = 0x5949f8bc7, Actual = 0x4aed21170, Error = 3855448663.1672974
Index 35: Predicted = 0x5af449ee4, Actual = 0x9de820a7c, Error = 17972423575.53308
Index 36: Predicted = 0x1391413025, Actual = 0x1757756a93, Error = 16210213485.866455
Index 37: Predicted = 0x2dbf7270dd, Actual = 0x22382facd0, Error = 49513939981.24811
Index 38: Predicted = 0x2886559a9b, Actual = 0x4b5f8303e9, Error = 149672520013.72742
Index 39: Predicted = 0x98c8113e3b, Actual = 0xe9ae4933d6, Error = 347459810714.7615
Index 40: Predicted = 0x20b05d20b7e, Actual = 0x153869acc5b, Error = 788113342243.4756
Index 41: Predicted = 0x1696ccb8e1d, Actual = 0x2a221c58d8f, Error = 1343066079089.604
Index 42: Predicted = 0x50b26b4d29f, Actual = 0x6bd3b27c591, Error = 1864358884081.7373
Index 43: Predicted = 0xdef4cb268c7, Actual = 0xe02b35a358f, Error = 83326651591.11523
Index 44: Predicted = 0x1875de8190b7, Actual = 0x122fca143c05, Error = 6898060186802.75
Index 45: Predicted = 0x1230f00b831f, Actual = 0x2ec18388d544, Error = 31407275332132.58
Index 46: Predicted = 0x689e837c30da, Actual = 0x6cd610b53cba, Error = 4636639038432.0
Index 47: Predicted = 0xcd26aa6013f0, Actual = 0xade6d7ce3b9b, Error = 34358976174165.78
Index 48: Predicted = 0xec974b5f9e34, Actual = 0x174176b015f4d, Error = 148984356258072.8
Index 49: Predicted = 0x2d6a754d3f7ab, Actual = 0x22bd43c2e9354, Error = 187823628313687.25
Index 50: Predicted = 0x2b7ce396f3181, Actual = 0x75070a1a009d4, Error = 1293723206998098.5
Index 51: Predicted = 0x11abcd83d36e18, Actual = 0xefae164cb9e3c, Error = 757478132797404.0
Index 52: Predicted = 0x18b4f3390decf8, Actual = 0x180788e47e326c, Error = 190672196844172.0
Index 53: Predicted = 0x2258a643d0ea28, Actual = 0x236fb6d5ad1f43, Error = 306834910754076.0
Index 54: Predicted = 0x31634c7beb9390, Actual = 0x6abe1f9b67e114, Error = 1.6143936485346692e+16
Index 55: Predicted = 0xf7c9efde77f4e0, Actual = 0x9d18b63ac4ffdf, Error = 2.55276090216256e+16
Index 56: Predicted = 0xaaf00881ca1cd0, Actual = 0x1eb25c90795d61c, Error = 9.013109354212386e+16
Index 57: Predicted = 0x48bd5d0ecad0f40, Actual = 0x2c675b852189a21, Error = 1.2761382323882934e+17
Index 58: Predicted = 0x2e13f10ba558040, Actual = 0x7496cbb87cab44f, Error = 3.175539853443205e+17
Index 59: Predicted = 0x10359b6a07b1e600, Actual = 0xfc07a1825367bbe, Error = 3.2969207850953344e+16
Index 60: Predicted = 0x1c178523462fa100, Actual = 0x13c96a3742f64906, Error = 5.984454014555484e+17
Index 61: Predicted = 0x11f774e94c1ec000, Actual = 0x363d541eb611abee, Error = 2.6137405792622295e+18
Index 62: Predicted = 0x7d556bf6f89d2c00, Actual = 0x7cce5efdaccf6808, Error = 3.801338671410483e+16
Index 63: Predicted = 0xe7655f0b50acf800, Actual = 0xf7051f27b09112d4, Error = 1.1258296599663145e+18
Index 64: Predicted = 0x1a78fd44662532000, Actual = 0x1a838b13505b26867, Error = 4.753071358864998e+16
import numpy as np
from scipy.interpolate import splrep, splev
from decimal import Decimal
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]
initial_points = 3
results = []
for i in range(initial_points, len(sequence)):
x_values_known = np.arange(i)
sequence_decimal = [Decimal(value) for value in sequence[:i]]
spline_rep = splrep(x_values_known, sequence_decimal, k=2)
predicted_next_number = splev(i, spline_rep)
actual_value = sequence[i]
predicted_hex = hex(int(predicted_next_number))
actual_hex = hex(actual_value)
results.append({
'index': i,
'predicted': predicted_hex,
'actual': actual_hex,
'error': abs(float(predicted_next_number) - actual_value)
})
for result in results:
print(f"Index {result['index']}: Predicted = {result['predicted']}, Actual = {result['actual']}, Error = {result['error']}")
Everything is useless, I have tried many predictions like this, none of them worked