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.

A093826 In binary representation: least number, k, which occurs n times in its factorial.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Overlapping occurrences are counted. - Michael S. Branicky, May 01 2021
a(47) = 262143. - Michael S. Branicky, May 02 2021

Examples

			12!_b = 11100100011001111110000000000 and 12_b = 1100 and the later string appears thrice in the former string.
		

Crossrefs

Cf. A093685.

Programs

  • 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
  • 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

Extensions

a(25)-a(37) from Michael S. Branicky, May 03 2021