login
A093826
In binary representation: least number, k, which occurs n times in its factorial.
1
5, 1, 16, 12, 49, 58, 60, 110, 209, 117, 240, 430, 255, 1423, 921, 980, 511, 1847, 3737, 3692, 3998, 7265, 15267, 15651, 15722, 31457, 32659, 64248, 57927, 64448, 64171, 250068, 129013, 501578, 256159, 510732, 980930, 979883
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
Cf. A093685.
Sequence in context: A221364 A211805 A211808 * A144699 A066787 A058352
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
a(25)-a(37) from Michael S. Branicky, May 03 2021
STATUS
approved