cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A079578 Least number coprime to n and greater than n+1.

Original entry on oeis.org

3, 5, 5, 7, 7, 11, 9, 11, 11, 13, 13, 17, 15, 17, 17, 19, 19, 23, 21, 23, 23, 25, 25, 29, 27, 29, 29, 31, 31, 37, 33, 35, 35, 37, 37, 41, 39, 41, 41, 43, 43, 47, 45, 47, 47, 49, 49, 53, 51, 53, 53, 55, 55, 59, 57, 59, 59, 61, 61, 67, 63, 65, 65, 67, 67, 71, 69, 71, 71, 73, 73
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 24 2003

Keywords

Crossrefs

Programs

  • Haskell
    a079578 n = head [m | m <- [n + 2 ..], gcd m n == 1]
    -- Reinhard Zumkeller, Oct 01 2014
  • Mathematica
    a[n_] := Module[{p = 2}, While[Divisible[n, p], p = NextPrime[p]]; n + p]; Array[a, 100] (* Amiram Eldar, Apr 13 2025 *)

Formula

a(n) = n + A053669(n).
a(n) = (A116934(n) - n)/A116933(n). - Reinhard Zumkeller, Feb 27 2006
Sum_{k=1..n} a(k) ~ n^2 / 2 + c * n, where c = A249270. - Amiram Eldar, Apr 13 2025