The following function,   due to D. Hickerson,   is said to generate "Almost integers" by the

"Almost Integer" page of Wolfram MathWorld,   (December 31 2013).   (See formula numbered   51.)



The function is:           



h
(
n
)
=



n
!


2
(
ln
⁡

2


)

n
+
1







{\displaystyle h(n)={\operatorname {n} ! \over 2(\ln {2})^{n+1}}}





It is said to produce "almost integers" for   n   between   1   and   17.
The purpose of the task is to verify this assertion.

Assume that an "almost integer" has either a nine or a zero as its first digit after the decimal point of its decimal string representation



Task

Calculate all values of the function checking and stating which are "almost integers".

Note: Use extended/arbitrary precision numbers in your calculation if necessary to ensure you have adequate precision of results as for example:

               h(18) = 3385534663256845326.39...



/* REXX ---------------------------------------------------------------
* 04.01.2014 Walter Pachl - using a rather aged ln function of mine
*                           with probably unreasonably high precision
* 05.01.2014 added n=18
*--------------------------------------------------------------------*/
Numeric Digits 100
Do n=1 To 18
  x=format(def(),20,10)
  Parse Var x '.' +1 d +1
  If pos(d,'09')>0 Then
    tag='almost an integer'
  Else
    tag=''
  Say right(n,2) x tag
  End
Exit
 
def:
 x=fact(n)/(2*ln(2,200)**(n + 1))
 Return x
 
ln: Procedure
/***********************************************************************
* Return ln(x) -- with specified precision
* Three different series are used for the ranges  0 to 0.5
*                                                 0.5 to 1.5
*                                                 1.5 to infinity
* 920903 Walter Pachl
***********************************************************************/
  Parse Arg x,prec,b
  If prec='' Then prec=9
  Numeric Digits (2*prec)
  Numeric Fuzz   3
  Select
    When x<=0 Then r='*** invalid argument ***'
    When x<0.5 Then Do
      z=(x-1)/(x+1)
      o=z
      r=z
      k=1
      Do i=3 By 2
        ra=r
        k=k+1
        o=o*z*z
        r=r+o/i
        If r=ra Then Leave
        End
      r=2*r
      End
    When x<1.5 Then Do
      z=(x-1)
      o=z
      r=z
      k=1
      Do i=2 By 1
        ra=r
        k=k+1
        o=-o*z
        r=r+o/i
        If r=ra Then Leave
        End
      End
    Otherwise /* 1.5<=x */ Do
      z=(x+1)/(x-1)
      o=1/z
      r=o
      k=1
      Do i=3 By 2
        ra=r
        k=k+1
        o=o/(z*z)
        r=r+o/i
        If r=ra Then Leave
        End
      r=2*r
      End
    End
  If b<>'' Then
    r=r/ln(b)
  Numeric Digits (prec)
  Return r+0
 
fact: Procedure
 Parse Arg m
 fact=1
 Do i=2 To m
   fact=fact*i
   End
 Return fact