A349647 Nonnegative integers which produce a record minimum MD5 hash.
0, 1, 4, 6, 27, 134, 138, 168, 363, 1970, 5329, 738639, 752491, 848775, 1803305, 2420500, 20412333, 207691249, 220455692, 517921150, 521602912, 1149023650, 1289986143, 5963709738, 6262635619, 23831964366, 79255202271, 1970864394858, 2255739204027
Offset: 1
Examples
a(5) = 27 because MD5("27") = 02e74f10e0327ad868d138f2b4fdd6f0_16 = 3859480213286334249913589638377625328, which is smaller than all previous values MD5("0"), ..., MD5("26").
Links
- Ben Whitmore, Table of n, a(n) for n = 1..32
- Wikipedia, MD5
Crossrefs
Record maxima: A349646.
Programs
-
Mathematica
recordsBy[l_, P_] := Module[{max = -Infinity, x, i, recs = {}}, For[i = 1, i <= Length[l], i++, x = P[l[[i]]]; If[x > max, max = x; AppendTo[recs, l[[i]]]; ] ]; recs ]; recordsBy[Range[1000], -Hash[ToString[#], "MD5"] &]
-
Python
from hashlib import md5 def afind(limit): record = "~" for k in range(limit+1): hash = md5(str(k).encode('utf-8')).hexdigest() if hash < record: print(k, end=", ") record = hash afind(10**7) # Michael S. Branicky, Nov 24 2021
Comments