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.

A061091 Number of k with 1 <= k <= n relatively prime to phi(k).

Original entry on oeis.org

1, 2, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 16, 16, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 21, 21, 21, 21, 21, 21, 22, 22, 23, 23, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 28
Offset: 1

Views

Author

Frank Ellermann, May 29 2001

Keywords

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 115-119.

Crossrefs

Partial sums of A297086.
Cf. A000010 (phi), A001620 (gamma), A003277, A073004, A080130.

Programs

  • Mathematica
    s[n_] := Boole[CoprimeQ[n, EulerPhi[n]]]; Accumulate[Array[s, 100]]  (* Amiram Eldar, Dec 10 2024 *)
  • PARI
    a(n) = sum(k=1, n, gcd(k, eulerphi(k)) == 1) \\ Charles R Greathouse IV, Jan 29 2013 (corrected by Iain Fox, Dec 25 2017)
    
  • PARI
    list(lim) = {my(s = 0); for(k = 1, lim, s += gcd(k, eulerphi(k)) == 1; print1(s, ", "));} \\ Amiram Eldar, Dec 10 2024

Formula

Limit_{n->oo} a(n) * log(log(log(n))) / n = 1/exp(gamma).
a(n) = Sum_{k=1..n} gcd(k, phi(k)) = 1.
a(1) = 1; a(n) = a(n-1) + A297086(n). - Iain Fox, Dec 25 2017