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.

A366061 Numbers of iterations that produce a record low of the digest of the SHA2-256 hash of the empty string.

This page as a plain text file.
%I A366061 #23 Dec 05 2024 19:02:03
%S A366061 1,2,6,7,36,674,815,11621,449652,2386324,2643745,187894152,704719562,
%T A366061 1390873253,1625785299,3479964180,6909167935,12446961112
%N A366061 Numbers of iterations that produce a record low of the digest of the SHA2-256 hash of the empty string.
%C A366061 The SHA2-256 algorithm takes inputs of any length but here we are feeding the output of every iteration to the next.
%H A366061 Wikipedia, <a href="https://en.wikipedia.org/wiki/SHA-2">SHA-2</a>.
%e A366061 a(1) = 1 because 1 iteration sha256("") = hex e3b0...b855 is taken as the first digest and so is a record.
%e A366061 a(2) = 2 is the next term since 2 times nested sha256(...(sha256("")...)) = hex 5df6...9456 is less than the previous record e3b0...b855.
%o A366061 (Python)
%o A366061 from itertools import islice
%o A366061 import hashlib
%o A366061 def g():
%o A366061   c, vmin, m = 1, b"\xFF" * 32, b""
%o A366061   while True:
%o A366061     if (m:= hashlib.sha256(m).digest()) < vmin:
%o A366061       vmin = m
%o A366061       yield c
%o A366061     c += 1
%o A366061 print(list(islice(g(), 16)))
%Y A366061 Cf. A365749 (for record highs).
%Y A366061 Cf. A349647 (in MD5).
%K A366061 nonn,more,hard,fini,base
%O A366061 1,2
%A A366061 _DarĂ­o Clavijo_, Sep 27 2023
%E A366061 a(17)-a(18) from _Michael S. Branicky_, Sep 28 2023