cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A349647 Nonnegative integers which produce a record minimum MD5 hash.

This page as a plain text file.
%I A349647 #24 Dec 25 2021 11:16:54
%S A349647 0,1,4,6,27,134,138,168,363,1970,5329,738639,752491,848775,1803305,
%T A349647 2420500,20412333,207691249,220455692,517921150,521602912,1149023650,
%U A349647 1289986143,5963709738,6262635619,23831964366,79255202271,1970864394858,2255739204027
%N A349647 Nonnegative integers which produce a record minimum MD5 hash.
%C A349647 a(1) = 0; a(n) is the smallest k such that MD5(k) < MD5(a(n-1)), where integer parameters to MD5 are encoded as base-10 ASCII strings.
%C A349647 If we assume that MD5 behaves like a random function from N to {0, ..., 2^128-1}, the expected length of this sequence is the harmonic number H(2^128) ~= 89.3.
%C A349647 a(33) > 10^15.
%H A349647 Ben Whitmore, <a href="/A349647/b349647.txt">Table of n, a(n) for n = 1..32</a>
%H A349647 Wikipedia, <a href="http://en.wikipedia.org/wiki/MD5">MD5</a>
%e A349647 a(5) = 27 because MD5("27") = 02e74f10e0327ad868d138f2b4fdd6f0_16 = 3859480213286334249913589638377625328, which is smaller than all previous values MD5("0"), ..., MD5("26").
%t A349647 recordsBy[l_, P_] :=
%t A349647 Module[{max = -Infinity, x, i, recs = {}},
%t A349647 For[i = 1, i <= Length[l], i++,
%t A349647   x = P[l[[i]]];
%t A349647   If[x > max,
%t A349647    max = x;
%t A349647    AppendTo[recs, l[[i]]];
%t A349647   ]
%t A349647 ];
%t A349647 recs
%t A349647 ];
%t A349647 recordsBy[Range[1000], -Hash[ToString[#], "MD5"] &]
%o A349647 (Python)
%o A349647 from hashlib import md5
%o A349647 def afind(limit):
%o A349647     record = "~"
%o A349647     for k in range(limit+1):
%o A349647         hash = md5(str(k).encode('utf-8')).hexdigest()
%o A349647         if hash < record:
%o A349647             print(k, end=", ")
%o A349647             record = hash
%o A349647 afind(10**7) # _Michael S. Branicky_, Nov 24 2021
%Y A349647 Record maxima: A349646.
%K A349647 nonn,base,fini,hard
%O A349647 1,3
%A A349647 _Ben Whitmore_, Nov 23 2021