(33s): OEIS A8904: Last Non-zero Digit of N! - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (33s): OEIS A8904: Last Non-zero Digit of N! (/thread-18577.html) |
(33s): OEIS A8904: Last Non-zero Digit of N! - Gerald H - 07-21-2022 08:26 AM Takes a real integer N from the stack & returns A8904(N) to stack. Last non-zero digit of N! https://oeis.org/search?q=a8904&sort=&language=&go=Search Code:
Uses the sub-programme V: Takes a real integer from the stack & stores remainder on division by 5 in R & quotient in Q & returns Q to stack, leaving Y, Z & T stack levels unaltered. Code:
|