OFFSET
1,3
COMMENTS
Iterations are SHA256(SHA256(...(SHA256(256 1 bits)))) with k nestings, and beginning from an input message which is 256 bits all 1. Each hash digest is 256 bits and is a 256 bit input to the next iteration. Bit strings are compared lexicographically, which means numerically when interpreted as 256 bit numbers (most to least significant bits).
Analog of A393716, which gives k for record high hash values starting from 256 bits of 0.
LINKS
Wikipedia, SHA-2 (SHA-256).
EXAMPLE
Here 0x... notation shows hexadecimal representations of 256-bit strings, which strings are what pass as arguments and return values of the SHA256 function, interpreted numerically in digit order most to least significant for sorting purposes. The first few iterations are:
k = 0: 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff; record, a(1) = 0.
k = 1: 0xaf9613760f72635fbdb44a5a0a63c39f12af30f950a6ee5c971be188e89c4051; record, a(2) = 1.
k = 2: 0x71ca5049661b67d2babaf306cd9bc8090a93324c2d4ff1bb12a371a02cc23eb8; record, a(3) = 2.
k = 3: 0x9fac7cfd6acb61dd22d32c2876818be20dda6717cf5387fcf9a53f4961018bb9, larger than the prevailing record.
k = 4: 0x18bdaafa75f6e0dfc8ca9e2d484499247b55c5adab6f9f820252eefc5ea858b9; record, a(4) = 4.
...
k = 19: 0x0bc286ff56a7bd5225f2d7ff6e0f7c187bcec5d86ff27f9a7e2e71b0dbc8db9c; record, a(5) = 19.
...
PROG
(Perl) use bigint; use Digest::SHA qw(sha256); $_="\xff" x length(sha256); my $r=1<<(length(sha256)*8); for(my $k=0; $k<=100000; $k++) {my $t=hex(unpack("H*", $_)); if ($t<$r) {print "$k\n"; $r=$t; } $_=sha256($_); }
(Python)
from hashlib import sha256
from itertools import count, islice
def agen(): # generator of terms
x = record = b"\xFF"*32
yield 0
for k in count(1):
x = sha256(x).digest()
if x < record:
record = x
yield k
print(list(islice(agen(), 18))) # Michael S. Branicky, Apr 26 2026
CROSSREFS
KEYWORD
nonn,fini
AUTHOR
Charles L. Hohn, Apr 26 2026
STATUS
approved