OFFSET
0,5
COMMENTS
See A007623 for the factorial base number system representation.
LINKS
A. Karttunen, Table of n, a(n) for n = 0..10080
FORMULA
a(n) = n - A034968(n).
MATHEMATICA
(* First run program for A007623 to define factBaseIntDs *) Table[n - Plus@@factBaseIntDs[n], {n, 0, 99}] (* Alonso del Arte, Nov 25 2012 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Nov 25 2012
STATUS
approved