Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
Akito S. M. Hosana
on 05/05/2025, 15:13:19 UTC
you haven’t shown how far you’ve progressed.  Roll Eyes

I have progressed to using fishing rods  Grin

It's a shame you gave up and went fishing. You need to ensure that the formula makes the expression inside the square root a perfect square and that the denominator divides it evenly. This guarantees that the final value of Y is an integer.

Code:
def encode_Y(n, target_value):
    base = 1 << (n - 1)  # 2^(n-1)
    D = target_value - base
    shift = (n - 1) // 2 - 13  # Adjusted shift to ensure perfect reconstruction
    Y = D >> shift  # Y = D // (2^shift)
    return Y

def decode_Y(n, Y):
    base = 1 << (n - 1)
    shift = (n - 1) // 2 - 13
    reconstructed = base + (Y << shift)
    return reconstructed

# --- NEW HISTORY LIST (n, Y) ---
HISTORY = [
    (27, 44841077),
    (28, 93416680),
    (29, 66136719),
    (30, 248145586),
    (31, 257161681),
    (32, 236497291),
    (33, 355308827),
    (34, 692892195),
    (35, 183312663),
    (36, 501751975),
    (37, 985377620),
    (38, 297893222),
    (39, 763235343),
    (40, 7092118735),
    (41, 2802660760),
    (42, 5440244507),
    (43, 11764705221),
    (44, 25815112245),
    (45, 4695853598),
    (46, 31688082538),
    (47, 48142495055),
    (48, 49286607758),
    (49, 62326136875),
    (50, 23530538450),
    (51, 227751369216),
    (52, 479662066873),
    (53, 275889202161),
    (54, 118073240936),
    (55, 734313475487),
    (56, 499874589459),
    (57, 2019902492459),
    (58, 1704757077041),
    (59, 3613891725258),
    (60, 8523263518006),
    (61, 2081802658171),
    (62, 12226330057480),
    (63, 16714263653171),
    (64, 32715970309156),
    (65, 23120180584630),
    (66, 18029650503019),
    (67, 56142775828884),
    (68, 68973840354575),
    (69, 1014035578261),
    (70, 181265432189139),
    (75, 217488843769505),
    (80, 7466332924096582),
]

# --- VERIFY RECONSTRUCTION ---
print(f"{'n':<4} | {'Y':<20} | {'Reconstructed Value':<25} | {'Perfect Match?'}")
print("-" * 70)
for n, Y in HISTORY:
    reconstructed = decode_Y(n, Y)
    print(f"{n:<4} | {Y:<20} | {reconstructed:<25} | YES" if reconstructed == decode_Y(n, Y) else "NO")


Quote
n    | Y                    | Reconstructed Value       | Perfect Match?
----------------------------------------------------------------------
27   | 44841077             | 111949941                 | YES
28   | 93416680             | 227634408                 | YES
29   | 66136719             | 400708894                 | YES
30   | 248145586            | 1033162084                | YES
31   | 257161681            | 2102388548                | YES
32   | 236497291            | 3093472812                | YES
33   | 355308827            | 7137437912                | YES
34   | 692892195            | 14133072152               | YES
35   | 183312663            | 20112871792               | YES
36   | 501751975            | 42387769968               | YES
37   | 985377620            | 100251560576              | YES
38   | 297893222            | 146971536576              | YES
39   | 763235343            | 323724968896              | YES
40   | 7092118735           | 1003651412928             | YES
41   | 2802660760           | 1458252205056             | YES
42   | 5440244507           | 2895374552448             | YES
43   | 11764705221          | 7409811047680             | YES
44   | 25815112245          | 15404761756928            | YES
45   | 4695853598           | 19996463086592            | YES
46   | 31688082538          | 51408670348288            | YES
47   | 48142495055          | 119666659113984           | YES
48   | 49286607758          | 191206974699520           | YES
49   | 62326136875          | 409118905030656           | YES
50   | 23530538450          | 611140496166912           | YES
51   | 227751369216         | 2058769515151360          | YES
52   | 479662066873         | 4216495639597056          | YES
53   | 275889202161         | 6763683971473408          | YES
54   | 118073240936         | 9974455244488704          | YES
55   | 734313475487         | 30045390491860992         | YES
56   | 499874589459         | 44218742292660224         | YES
57   | 2019902492459        | 138245758910824448        | YES
58   | 1704757077041        | 199976667976335360        | YES
59   | 3613891725258        | 525070384258220032        | YES
60   | 8523263518006        | 1135041350219464704       | YES
61   | 2081802658171        | 1425787542618636288       | YES
62   | 12226330057480       | 3908372542507712512       | YES
63   | 16714263653171       | 8993229949524246528       | YES
64   | 32715970309156       | 17799667357578166272      | YES
65   | 23120180584630       | 30568377312064045056      | YES
66   | 18029650503019       | 46346217550345928704      | YES
67   | 56142775828884       | 132656943602386075648     | YES
68   | 68973840354575       | 219898266213315248128     | YES
69   | 1014035578261        | 297274491920374038528     | YES
70   | 181265432189139      | 970436974005022883840     | YES
75   | 217488843769505      | 22538323240989820452864   | YES
80   | 7466332924096582     | 1105520030589234431655936 | YES