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).

This page as a plain text file.
%I A219651 #20 Jul 17 2025 14:45:02
%S A219651 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,
%T A219651 24,25,25,28,28,29,29,30,30,33,33,34,34,35,35,38,38,39,39,40,40,46,46,
%U A219651 47,47,48,48,51,51,52,52,53,53,56,56,57,57,58,58,61,61
%N A219651 a(n) = n minus (sum of digits in factorial base expansion of n).
%C A219651 See A007623 for the factorial base number system representation.
%H A219651 A. Karttunen, <a href="/A219651/b219651.txt">Table of n, a(n) for n = 0..10080</a>
%F A219651 a(n) = n - A034968(n).
%t A219651 (* First run program for A007623 to define factBaseIntDs *) Table[n - Plus@@factBaseIntDs[n], {n, 0, 99}] (* _Alonso del Arte_, Nov 25 2012 *)
%o A219651 (Scheme) (define (A219651 n) (- n (A034968 n)))
%o A219651 (Python)
%o A219651 from itertools import count
%o A219651 def A219651(n):
%o A219651     c, f = 0, 1
%o A219651     for i in count(2):
%o A219651         f *= i
%o A219651         if f>n:
%o A219651             break
%o A219651         c += (i-1)*(n//f)
%o A219651     return c # _Chai Wah Wu_, Oct 11 2024
%Y A219651 Bisection: A219650. Analogous sequence for binary system: A011371, for Zeckendorf expansion: A219641.
%Y A219651 Cf. A007623, A034968, A219652-A219655, A219656, A219659, A219666.
%K A219651 nonn,base
%O A219651 0,5
%A A219651 _Antti Karttunen_, Nov 25 2012