A233286 Number of trailing zeros in the factorial base representation of n-th Fibonacci number.
0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 5, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0, 1, 0, 0, 1
Offset: 1
Examples
The factorial base representation (A007623(A000045(n))) of Fibonacci numbers look like this, from n=1 onward: 1, 1, 10, 11, 21, 110, 201, 311, 1120, 2101, 3221, 11000, 14221, 30221, 50120, 121011, 211201, 332220, ... When we count the trailing zeros of each, we get 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0, 1, ..., the first terms of this sequence.
Links
Programs
-
Mathematica
a[n_] := Module[{k = Fibonacci[n], m = 2, r, s = {}}, While[{k, r} = QuotientRemainder[k, m]; k != 0|| r != 0, AppendTo[s, r]; m++]; FirstPosition[s, ?(# > 0&)][[1]] - 1]; Array[a, 100] (* _Amiram Eldar, Feb 21 2024 *)
-
PARI
A233286(n) = if(n<=2, 0, my(f=fibonacci(n)); for(k=2,oo,if(f%(k!), return(k-2)))); \\ Antti Karttunen, Jan 18 2025
-
Scheme
(define (A233286 n) (A230403 (A000045 n)))
Extensions
Data section extended to a(105) by Antti Karttunen, Jan 18 2025
Comments