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.

A070777 a(1) = 1; a(n) = (largest prime factor of n) - 1.

Original entry on oeis.org

1, 1, 2, 1, 4, 2, 6, 1, 2, 4, 10, 2, 12, 6, 4, 1, 16, 2, 18, 4, 6, 10, 22, 2, 4, 12, 2, 6, 28, 4, 30, 1, 10, 16, 6, 2, 36, 18, 12, 4, 40, 6, 42, 10, 4, 22, 46, 2, 6, 4, 16, 12, 52, 2, 10, 6, 18, 28, 58, 4, 60, 30, 6, 1, 12, 10, 66, 16, 22, 6, 70, 2, 72, 36, 4, 18, 10, 12, 78, 4, 2, 40, 82, 6
Offset: 1

Views

Author

Labos Elemer, May 07 2002

Keywords

Comments

Also a(n) = Euler Phi of largest prime factor of n (previous name).
a(m*n) = max(a(m), a(n)). - Robert Israel, May 19 2015

Examples

			102 = 2*3*17, so a(102) = 17 - 1 = 16.
		

Crossrefs

Programs

  • Maple
    with(numtheory): A070777 := n -> `if`(n=1,1,phi(max(op(factorset(n))))): # Peter Luschny, Oct 23 2010
  • Mathematica
    a[n_] := EulerPhi[Last[FactorInteger[n]][[1]]]; Table[a[n], {n, 1, 200}] (* José María Grau Ribas, Feb 21 2010 *)
  • PARI
    a(n) = if (n==1, 1, vecmax(factor(n)[,1]) - 1); \\ after A006530; Michel Marcus, May 19 2015

Formula

a(n) = A000010(A006530(n)) = A006530(n) - 1 if n >= 2.

Extensions

New name from Michel Marcus, May 19 2015