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.

A058656 a(n) = gcd(n+1, phi(n)).

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 8, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 1, 2, 1, 12, 1, 2, 3, 8, 1, 2, 1, 2, 5, 2, 1, 2, 1, 2, 1, 4, 1, 2, 1, 8, 3, 2, 1, 2, 1, 2, 3, 4, 1, 6, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 1, 6, 1, 2, 1, 2, 1, 2, 1, 2, 3, 8, 1, 2, 1, 4, 1, 2, 1, 24, 1, 2, 3, 20, 1, 2, 1
Offset: 1

Views

Author

Labos Elemer, Dec 28 2000

Keywords

Comments

Compare sequences gcd(x, phi(n)), where x = n-1, n, or n+1.

Examples

			For n = 12, 13, 14, 15: n+1 = 13, 14, 15, 16; phi(n) = 4, 12, 12, 8; a(n) = gcd(13,4), gcd(14,12), gcd(15,12), gcd(16,8) = 1, 2, 3, 8, respectively.
		

Crossrefs

Programs

  • Mathematica
    Table[GCD[n+1,EulerPhi[n]],{n,110}] (* Harvey P. Dale, Nov 17 2011 *)
  • PARI
    a(n) = gcd(n+1, eulerphi(n)); \\ Amiram Eldar, Mar 13 2025

Extensions

Offset corrected by Sean A. Irvine, Aug 11 2022