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.

A265893 a(n) = A084558(n) - A230403(n); the length of factorial base representation of n without its trailing zeros.

This page as a plain text file.
%I A265893 #12 Feb 21 2024 01:20:07
%S A265893 0,1,1,2,1,2,1,3,2,3,2,3,1,3,2,3,2,3,1,3,2,3,2,3,1,4,3,4,3,4,2,4,3,4,
%T A265893 3,4,2,4,3,4,3,4,2,4,3,4,3,4,1,4,3,4,3,4,2,4,3,4,3,4,2,4,3,4,3,4,2,4,
%U A265893 3,4,3,4,1,4,3,4,3,4,2,4,3,4,3,4,2,4,3,4,3,4,2,4,3,4,3,4,1,4,3,4,3,4,2,4,3,4,3,4,2,4,3,4,3,4,2,4,3,4,3,4,1
%N A265893 a(n) = A084558(n) - A230403(n); the length of factorial base representation of n without its trailing zeros.
%H A265893 Antti Karttunen, <a href="/A265893/b265893.txt">Table of n, a(n) for n = 0..10080</a>
%H A265893 <a href="/index/Fa#facbase">Index entries for sequences related to factorial base representation</a>.
%F A265893 a(n) = A084558(n) - A230403(n).
%e A265893 In factorial base A007623, 0 is shown as "0", but in this case all the zeros are trailing, so we set a(0) = 0 by convention.
%e A265893 For n = 2, A007623(2) = "10", and by discarding the trailing zero only one significant digit "1" is left, thus a(2) = 1.
%e A265893 For n = 132, A007623(132) = "10200", and by discarding its trailing zeros we are left with just three digits "102", thus a(132) = 3.
%t A265893 a[n_] := Module[{k = n, m = 2, r, s = {}}, While[{k, r} = QuotientRemainder[k, m]; k != 0|| r != 0, AppendTo[s, r]; m++]; Length[s] - FirstPosition[s, _?(#>0 &)][[1]] + 1]; a[0] = 0; Array[a, 100, 0] (* _Amiram Eldar_, Feb 21 2024 *)
%o A265893 (Scheme) (define (A265893 n) (- (A084558 n) (A230403 n)))
%Y A265893 Cf. A007623, A084558, A230403.
%Y A265893 Column 1 of A265892.
%K A265893 nonn,base
%O A265893 0,4
%A A265893 _Antti Karttunen_, Dec 20 2015