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.

A219651 a(n) = n minus (sum of digits in factorial base expansion of n).

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 5, 5, 6, 6, 7, 7, 10, 10, 11, 11, 12, 12, 15, 15, 16, 16, 17, 17, 23, 23, 24, 24, 25, 25, 28, 28, 29, 29, 30, 30, 33, 33, 34, 34, 35, 35, 38, 38, 39, 39, 40, 40, 46, 46, 47, 47, 48, 48, 51, 51, 52, 52, 53, 53, 56, 56, 57, 57, 58, 58, 61, 61
Offset: 0

Views

Author

Antti Karttunen, Nov 25 2012

Keywords

Comments

See A007623 for the factorial base number system representation.

Crossrefs

Bisection: A219650. Analogous sequence for binary system: A011371, for Zeckendorf expansion: A219641.

Programs

  • Mathematica
    (* First run program for A007623 to define factBaseIntDs *) Table[n - Plus@@factBaseIntDs[n], {n, 0, 99}] (* Alonso del Arte, Nov 25 2012 *)
  • Python
    from itertools import count
    def A219651(n):
        c, f = 0, 1
        for i in count(2):
            f *= i
            if f>n:
                break
            c += (i-1)*(n//f)
        return c # Chai Wah Wu, Oct 11 2024
  • Scheme
    (define (A219651 n) (- n (A034968 n)))
    

Formula

a(n) = n - A034968(n).