Post Reply 
(42S) Subfactorial
09-08-2021, 10:26 PM
Post: #4
RE: (42S) Subfactorial
(09-06-2021 06:50 PM)John Keith Wrote:  The second formula can also be simplified to round(n!/e). More information and formulas at A000166.

Another perspective is with n! numerator, n!/!n is best approximation for e

With (n-1)! numerator, (n-1)!/!(n-1) is also best approximation for e

Difference of two fraction should be as tiny as possible, but not zero.

numer(n!/!n - (n-1)!/!(n-1)) = n! * !(n-1) - (n-1)! * !n = (n-1)! * (n * !(n-1) - !n)

Minimizing numerator (but not zero), last term should be ±1 (depends on parity of n)

!n = n * !(n-1) ± 1

With !1 = round(1!/e) = 0, !2 = round(2!/e) = 1, !2 = 2 * !1 + 1

!n = n * !(n-1) + (-1)^n
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(42S) Subfactorial - Eddie W. Shore - 09-06-2021, 04:43 PM
RE: (42S) Subfactorial - John Keith - 09-06-2021, 06:50 PM
RE: (42S) Subfactorial - Albert Chan - 09-07-2021, 02:21 PM
RE: (42S) Subfactorial - Werner - 09-09-2021, 07:24 AM
RE: (42S) Subfactorial - Albert Chan - 09-09-2021, 03:33 PM
RE: (42S) Subfactorial - Albert Chan - 09-08-2021 10:26 PM
RE: (42S) Subfactorial on HP-15C - C.Ret - 09-11-2021, 04:15 PM
RE: (42S) Subfactorial - Werner - 09-09-2021, 07:45 AM
RE: (42S) Subfactorial - Werner - 09-09-2021, 12:31 PM
RE: (42S) Subfactorial - ijabbott - 09-11-2021, 08:24 AM
RE: (42S) Subfactorial - Gil - 09-12-2021, 12:05 AM
RE: (42S) Subfactorial - Albert Chan - 09-12-2021, 12:46 PM



User(s) browsing this thread: 1 Guest(s)