Problem 56428. Easy Sequences 79: Trailing Zeros of Fibonorial Numbers at any Base
In other words, the fibonorial of n, , is the product of all Fibonacci numbers from to .
Given an integer n and a number base b, write a function that calculates the number of trailing zeros of the fibonorial of n when written in base-b.
For example, for and , the function should return 2, because:
>> dec2base(prod([1 1 2 3 5 8 13 21 34 55]),4)
>> '13103120230200'
For and , the function should return 1.
>> dec2base(prod([1 1 2 3 5 8 13 21 34 55]),13)
>> '1C4CB080'
--------------------
Hint: As a practice, you may want to solve first, the previous problem: Easy Sequences 78: Trailing Zeros of Factorial Numbers at any Base.
Solution Stats
Problem Comments
-
1 Comment
GeeTwo
on 21 Dec 2022
Note that in addition to global, persistent, java and BigInteger; for, if, case, and switch are forbidden.
Only needs scalar inputs - test cases do arrayfun()s.
Solution Comments
Show commentsProblem Recent Solvers3
Suggested Problems
-
Make the vector [1 2 3 4 5 6 7 8 9 10]
49798 Solvers
-
211 Solvers
-
How many unique Pythagorean triples?
143 Solvers
-
Easy Sequences 34: Modified Pascal's Triangle
8 Solvers
-
Easy Sequences 68: Factorial Rectangles
6 Solvers
More from this Author116
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!