The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A265893 a(n) = A084558(n) - A230403(n); the length of factorial base representation of n without its trailing zeros. 2
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
FORMULA
a(n) = A084558(n) - A230403(n).
EXAMPLE
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.
For n = 2, A007623(2) = "10", and by discarding the trailing zero only one significant digit "1" is left, thus a(2) = 1.
For n = 132, A007623(132) = "10200", and by discarding its trailing zeros we are left with just three digits "102", thus a(132) = 3.
MATHEMATICA
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 *)
PROG
(Scheme) (define (A265893 n) (- (A084558 n) (A230403 n)))
CROSSREFS
Column 1 of A265892.
Sequence in context: A143773 A323524 A354713 * A191372 A185316 A053279
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Dec 20 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 2 03:32 EDT 2024. Contains 373032 sequences. (Running on oeis4.)