---
tag: Z83P73MG91
kind: concept
name: Almost periodic sequence
msc: [39A24, 42A75]
sources:
  - url: https://en.wikipedia.org/wiki/Almost_periodic_function
---

## Summary

An almost periodic sequence is a bounded sequence that comes back arbitrarily close to itself after shifts that occur regularly.
It need not repeat exactly.
It is the discrete version, in the sense of Harald Bohr, of an [[almost periodic function|GZBSV8DYGS]].
Every [[periodic sequence|Q3B6K9HYRG]] is almost periodic, and so is every sum of finitely many sequences $e^{i \lambda n}$.
Almost periodic sequences arise as solutions of difference equations with almost periodic coefficients or forcing.

## Explanations

### L1 human

A periodic sequence returns exactly to itself after a fixed shift.
An almost periodic sequence returns to within any small error you choose, and the good shifts appear at fairly regular gaps.
The sequence $x_n = \cos n$ never repeats exactly, because $2\pi$ is not a rational number.
Still, $n \mapsto \cos(n + p)$ is uniformly close to $\cos n$ whenever the integer $p$ is close to a multiple of $2\pi$, and such integers come again and again.
