This preview shows page 1. Sign up to view the full content.
Unformatted text preview:  Homework 3. Programming Assignment The goal of this assignment is to ﬁnd good approximations of
Hn = 1
n! = 1 · 2 · 3 · · · n
for large n (n → ∞).
(2)  Evaluation of (Zeta Function) Hn :
(2) Tabulate and plot Hn for a range of n (e.g., 1 ≤ n ≤ 1000) using your favorite programming language (Maple or Mathematica are ﬁne). Based on this numerical computation
ﬁnd a good approximation of Hn for large n up to a constant term. That is, ﬁnd a simple
function f (n) (e.g., f (n) = log n) such that Hn ≈ f (n) + constant (and this approximation you should check on your plots and/or tables). For example, your computations may
indicate that Hn ≈ n n + 3.2n + 4 (this is not the correct answer!).
 Stirling’s Approximation:
Tabulate and plot n log k
k=1 for a range of n (e.g., 1 ≤ n ≤ 1000). Based on this numerical computation ﬁnd a good
n log n! = log k
k=1 for large n up to a log n term, if possible. That is, your answer may look like this
log n! ≈? n2 log n + n + 3 log n.
Include your program in the homework write-up. 1 ...
View Full Document
- Fall '08