OFFSET
0,1
COMMENTS
Overlapping occurrences are counted. - Michael S. Branicky, May 01 2021
a(47) = 262143. - Michael S. Branicky, May 02 2021
EXAMPLE
12!_b = 11100100011001111110000000000 and 12_b = 1100 and the later string appears thrice in the former string.
MATHEMATICA
f[n_] := ToString[ FromDigits[ IntegerDigits[n, 2]]]; g[n_] := Length[ StringPosition[ f[n! ], f[n]]]; a = Table[0, {30}]; Do[ b = g[n]; If[a[[b + 1]] == 0, a[[b + 1]] = n], {n, 29000}]; a
PROG
(Python)
from itertools import count, takewhile
def count_overlaps(subs, s):
c = i = 0
while i != -1:
i = s.find(subs, i)
if i != -1: c += 1; i += 1
return c
def afind(limit):
kfact, adict = 1, dict()
for k in range(1, limit+1):
kb, kfact = bin(k)[2:], kfact * k
kfactb = bin(kfact)[2:]
n = count_overlaps(kb, kfactb)
if n not in adict: adict[n] = k
return [adict[n] for n in takewhile(lambda i: i in adict, count(0))]
print(afind(16000)) # Michael S. Branicky, May 01 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert G. Wilson v and Reinhard Zumkeller, Apr 16 2004
EXTENSIONS
a(25)-a(37) from Michael S. Branicky, May 03 2021
STATUS
approved