VOOZH about

URL: https://oeis.org/A393294

⇱ A393294 - OEIS


login
A393294
Iteration numbers k such that MD5^{k}(128 bits of 0) is a record high value.
6
0, 1, 3, 5, 28, 50, 9270, 92938, 93977, 178832, 475736, 661584, 2860508, 10586211, 11883640, 32186206, 86148819, 121910190, 122649559, 3345369442, 4414031837, 251051846202, 1361169945062, 1500548504453, 11161953529697, 15562294853956, 20884436327980
OFFSET
1,3
COMMENTS
Iterations are MD5(MD5(...(MD5(128 0 bits)))) with k nestings, and beginning from an input message which is 128 bits all 0.
Each hash digest is 128 bits and is a 128 bit input to the next iteration.
Bit strings are compared lexicographically, which means numerically when interpreted as 128 bit numbers (most to least significant bits).
This is a finite sequence, as there are only a finite number of hash digests (2^128 of them), but it is not known what maximum hash may be reached, nor when it is reached.
Because hash outputs are probabilistically equivalent to random values, there is a ~1/2 chance of the sequence ending at or before 46 terms, due to the underlying hash series forming a cycle. If reached, the expected value (with standard deviation) of a(46) is 2^(~64.6, s.d. ~9.5), on an underlying hash value of 2^128 - 2^(~63.1, s.d. ~9.7).
The first nonzero hash in the series, 0x4ae71336e44bf9bf79d2752e234818a5, in base 10 equals 99562681977162996006182885104198097061.
For a(27) = 20884436327980, the underlying hash is 0xfffffffffffbfbb5e5f5423502e812e1.
EXAMPLE
Here 0x... notation shows hexadecimal representations of 128-bit strings, which strings are what pass as arguments and return values of the MD5 function, interpreted numerically in digit order most to least significant for sorting purposes. The first few iterations are:
k = 0: 0x00000000000000000000000000000000; record, a(1) = 0.
k = 1: 0x4ae71336e44bf9bf79d2752e234818a5; record, a(2) = 1.
k = 2: 0x398d01fdf7934d1292c263d374778e1a, smaller than the prevailing record.
k = 3: 0x7995886059df6dd8a1cef4338aa4118e; record, a(3) = 3.
k = 4: 0x543a5cb14988ac60d7068649d34434f8, smaller than the prevailing record.
k = 5: 0xfbfdd8ae19dd5a531f729e8ec0ab66aa; record, a(4) = 5.
PROG
(Perl) use bigint; use Digest::MD5 qw(md5); $_="\x00" x length(md5); my $r=-1; for(my $k=0; $k<=100000; $k++) {my $t=hex(unpack("H*", $_)); if ($t>$r) {print "$k\n"; $r=$t; } $_=md5($_); }
(Python)
from hashlib import md5
def A393294(n):
if not hasattr(A := A393294, 'msg'):
A.iter, A.max, A.msg, A.terms = 0, b'', (0).to_bytes(16), []
while n > len(A.terms):
while A.max >= A.msg:
A.iter += 1; A.msg = md5(A.msg).digest()
A.max = A.msg; A.terms.append(A.iter)
return A.terms[n-1]
print([A393294(n) for n in range(1, 10)])# M. F. Hasler, Feb 12 2026
CROSSREFS
Cf. A234849 (alternate approach), A392764 (equivalent for SHA1), A393716 (SHA256).
Sequence in context: A307630 A163783 A103526 * A054388 A110255 A290330
KEYWORD
nonn,fini,hard,changed
AUTHOR
Charles L. Hohn, Feb 10 2026
STATUS
approved