[go: nahoru, domu]

login
Revision History for A112509 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Maximum number of numbers represented by substrings of an n-bit number's binary representation.
(history; published version)
#16 by Michel Marcus at Fri Jan 13 13:22:29 EST 2023
STATUS

reviewed

approved

#15 by Joerg Arndt at Fri Jan 13 11:19:08 EST 2023
STATUS

proposed

reviewed

#14 by Michael S. Branicky at Fri Jan 13 10:09:45 EST 2023
STATUS

editing

proposed

#13 by Michael S. Branicky at Fri Jan 13 09:49:22 EST 2023
PROG

print([a(n) for n in range(1, 2021)]) # Michael S. Branicky, Jan 13 2023

#12 by Michael S. Branicky at Fri Jan 13 09:48:24 EST 2023
PROG

print([a(n) for n in range(1, 1020)]) # Michael S. Branicky, Jan 13 2023

STATUS

proposed

editing

#11 by Michael S. Branicky at Fri Jan 13 09:44:48 EST 2023
STATUS

editing

proposed

#10 by Michael S. Branicky at Fri Jan 13 09:44:45 EST 2023
PROG

(Python)

from itertools import product

def c(w):

return len(set(w[i:j+1] for i in range(len(w)) if w[i] != "0" for j in range(i, len(w)))) + int("0" in w)

def a(n):

return max(c("1"+"".join(b)) for b in product("01", repeat=n-1))

print([a(n) for n in range(1, 10)]) # Michael S. Branicky, Jan 13 2023

STATUS

approved

editing

#9 by Michael De Vlieger at Fri Jan 13 09:18:26 EST 2023
STATUS

reviewed

approved

#8 by Joerg Arndt at Fri Jan 13 07:19:20 EST 2023
STATUS

proposed

reviewed

#7 by Michel Marcus at Fri Jan 13 06:23:53 EST 2023
STATUS

editing

proposed