How to resolve the algorithm Hickerson series of almost integers step by step in the J programming language
How to resolve the algorithm Hickerson series of almost integers step by step in the J programming language
Table of Contents
Problem Statement
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
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:
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Hickerson series of almost integers step by step in the J programming language
Source code in the j programming language
ln2=: [: +/ 1 % [: (*2x&^) 1+i.
h=: ! % 2*(ln2 99)^>:
1 23j3": (h ,.~ 0 9 e.~ 10 <.@* 1 | h) x:1+i.17
1 1.041
1 3.003
1 12.996
1 74.999
1 541.002
1 4683.001
1 47292.999
1 545834.998
1 7087261.002
1 102247563.005
1 1622632572.998
1 28091567594.982
1 526858348381.001
1 10641342970443.085
1 230283190977853.037
0 5315654681981354.513
0 130370767029135900.458
You may also check:How to resolve the algorithm Old lady swallowed a fly step by step in the Nim programming language
You may also check:How to resolve the algorithm Variadic function step by step in the M4 programming language
You may also check:How to resolve the algorithm Solve the no connection puzzle step by step in the Elixir programming language
You may also check:How to resolve the algorithm Sequence of non-squares step by step in the IDL programming language
You may also check:How to resolve the algorithm Copy a string step by step in the sed programming language