Challenge: First Digit of Factorial Programme
|
12-05-2017, 08:11 AM
(This post was last modified: 12-05-2017 09:46 AM by Gerald H.)
Post: #1
|
|||
|
|||
Challenge: First Digit of Factorial Programme
The challenge is to produce a programme that for natural number input N returns the first, ie leftmost, digit of N! on the 50g.
The programme below uses the formula here http://mathworld.wolfram.com/StirlingsAp...ation.html & gives correct answers for input 0 to 5,362. The OEIS reference is here Edit: Was wrong link. https://oeis.org/A008905 Speed is the secondary consideration & accuracy the first. I don't expect my programme to be bettered but would be very pleased to be proven wrong. Size: 76. CkSum: # 86A4h Code: :: |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)