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.
%I A219663 #32 Jul 17 2025 14:45:15 %S A219663 0,1,3,9,34,160,1106,8806,68835,598355,6124625,71839629,913850187, %T A219663 12304189279,175964165619 %N A219663 Number of times an odd number is encountered, when going from (n+1)!-1 to n!-1 using the iterative process described in A219652. %C A219663 Ratio a(n)/A219662(n) develops as follows: %C A219663 0, 1, 1.5, 0.9, 0.694..., 0.597..., 0.735..., 0.911..., 0.841..., 0.768..., 0.793..., 0.889..., 0.992..., 1.059..., 1.100... %C A219663 Compare this to how the ratio A218543(n)/A218542(n) develops (ratios listed in entry A218543) and see also the associated graphs plotted by OEIS Server. %H A219663 Antti Karttunen, <a href="/A219663/b219663.txt">Table of n, a(n) for n = 1..15</a> %H A219663 Antti Karttunen, <a href="https://oeis.org/plot2a?name1=A219663&name2=A219662&tform1=untransformed&tform2=untransformed&shift=0&radiop1=ratio&drawpoints=true">Sequence plotted together with A219662 showing how their ratio develops.</a> %F A219663 a(n) = A219661(n) - A219662(n). %e A219663 (1!)-1 (0) is reached from (2!)-1 (1) with one step by subtracting A034968(1) from 1. Zero is not an odd number, so a(1)=0. %e A219663 (2!)-1 (1) is reached from (3!)-1 (5) with two steps by first subtracting A034968(5) from 5 -> 2, and then subtracting A034968(2) from 2 -> 1. Two is not an odd number, but one is, so a(2)=1. %e A219663 (3!)-1 (5) is reached from (4!)-1 (23) with five steps by repeatedly subtracting the sum of digits in factorial expansion as: 23 - 6 = 17, 17 - 5 = 12, 12 - 2 = 10, 10 - 3 = 7, 7 - 2 = 5. Of these (after 23) only 17, 7 and 5 are odd numbers, so a(3)=3. %o A219663 (Scheme) %o A219663 (definec (A219663 n) (if (< n 2) 0 (let loop ((i (- (A000142 (1+ n)) (A000217 n) 1)) (s 0)) (cond ((isA000142? (1+ i)) (+ s (modulo i 2))) (else (loop (A219651 i) (+ s (modulo i 2)))))))) %o A219663 (define (isA000142? n) (and (> n 0) (let loop ((n n) (i 2)) (cond ((= 1 n) #t) ((not (zero? (modulo n i))) #f) (else (loop (/ n i) (1+ i))))))) %Y A219663 Cf. A034968, A218542, A218543, A219652, A219661, A219662, A219666. %K A219663 nonn,base %O A219663 1,3 %A A219663 _Antti Karttunen_, Dec 03 2012