# A Simple Randomized Algorithm to Compute Harmonic Numbers and Logarithms

**Authors:** Ali Dasdan

arXiv: 1704.04538 · 2017-04-24

## TL;DR

This paper introduces a simple randomized algorithm that efficiently approximates harmonic numbers and logarithms by leveraging properties of maximum values in random lists, with potential extensions for various bases and arguments.

## Contribution

The paper presents a novel randomized method for approximating harmonic numbers and logarithms, connecting maximum value statistics with logarithmic functions.

## Key findings

- Efficient approximation of harmonic numbers using random maximums.
- Approximation of natural logarithm from harmonic numbers with increasing accuracy.
- Extension capability to approximate logarithms with different bases and rational arguments.

## Abstract

Given a list of N numbers, the maximum can be computed in N iterations. During these N iterations, the maximum gets updated on average as many times as the Nth harmonic number. We first use this fact to approximate the Nth harmonic number as a side effect. Further, using the fact the Nth harmonic number is equal to the natural logarithm of N plus a constant that goes to zero with N, we approximate the natural logarithm from the harmonic number. To improve accuracy, we repeat the computation over many lists of uniformly generated random numbers. The algorithm is easily extended to approximate logarithms with integer bases or rational arguments.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1704.04538/full.md

## Figures

3 figures with captions in the complete paper: https://tomesphere.com/paper/1704.04538/full.md

## References

2 references — full list in the complete paper: https://tomesphere.com/paper/1704.04538/full.md

---
Source: https://tomesphere.com/paper/1704.04538