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.

A052126 a(1) = 1; for n>1, a(n)=n/(largest prime dividing n).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 4, 3, 2, 1, 4, 1, 2, 3, 8, 1, 6, 1, 4, 3, 2, 1, 8, 5, 2, 9, 4, 1, 6, 1, 16, 3, 2, 5, 12, 1, 2, 3, 8, 1, 6, 1, 4, 9, 2, 1, 16, 7, 10, 3, 4, 1, 18, 5, 8, 3, 2, 1, 12, 1, 2, 9, 32, 5, 6, 1, 4, 3, 10, 1, 24, 1, 2, 15, 4, 7, 6, 1, 16, 27, 2, 1, 12, 5, 2, 3, 8, 1, 18, 7, 4, 3, 2, 5, 32, 1
Offset: 1

Views

Author

James Sellers, Jan 21 2000

Keywords

Comments

For n>1, a(n)=1 if and only if n is prime. - Zak Seidov, Feb 09 2015
For n > 1, a(n) is the smallest divisor of n such that n/a(n) is prime. - David James Sycamore, Jan 03 2024

Examples

			a(15) = 15/(largest prime dividing 15) = 15/5 = 3.
		

Crossrefs

Left inverse of A253560.

Programs

  • Maple
    a := n -> `if`(n=1, 1, n/max(numtheory[factorset](n)));
    seq(a(n), n=1..97); # Peter Luschny, Jul 28 2014
  • Mathematica
    a052126[n_] := Array[If[n == 1, 1, #/FactorInteger[#][[-1]][[1]]] &, n]; a052126[97] (* Michael De Vlieger, Dec 21 2014 *)
  • PARI
    gpf(n)=my(f=factor(n)[,1]); f[#f]
    a(n)=if(n<4,return(1)); n/gpf(n) \\ Charles R Greathouse IV, Apr 28 2015

Formula

a(n) = n/A006530(n).
a(n) = A130065(n)/A020639(n). - Reinhard Zumkeller, May 05 2007
a(A002110(n)) = A002110(n-1), a(p^k) = p^(k-1), p any prime; k >= 1. - David James Sycamore, Jan 03 2024
a(n) = n - A171462(n). - Antti Karttunen, Jan 04 2024