The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A300518 The greatest prime factor of the squarefree part of n, or 1 if n is square. 2

%I #25 Sep 08 2022 08:46:20

%S 1,2,3,1,5,3,7,2,1,5,11,3,13,7,5,1,17,2,19,5,7,11,23,3,1,13,3,7,29,5,

%T 31,2,11,17,7,1,37,19,13,5,41,7,43,11,5,23,47,3,1,2,17,13,53,3,11,7,

%U 19,29,59,5,61,31,7,1,13,11,67,17,23,7,71,2,73,37

%N The greatest prime factor of the squarefree part of n, or 1 if n is square.

%H Alois P. Heinz, <a href="/A300518/b300518.txt">Table of n, a(n) for n = 1..20000</a>

%H Hugo Pfoertner, <a href="/A300518/a300518.pdf">Illustration of first 10^5 terms</a>, zoom into central part to see nice patterns.

%F a(n) = A006530(A007913(n)).

%e For n = 15000 = 5^4 * 3 * 2^3, 3 is the greatest unpaired prime, so a(15000) = 3.

%p a:= n-> max(1, seq(i[1]^irem(i[2], 2), i=ifactors(n)[2])):

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Mar 07 2018

%t Array[FactorInteger[Sqrt[#] /. (c_: 1)*a_^(b_: 0) :> (c*a^b)^2][[-1, 1]] &, 74] (* _Michael De Vlieger_, Mar 10 2018, after _Bill Gosper_ at A007913 *)

%o (PARI) gpf(n) = if (n==1, 1, vecmax(factor(n)[,1]));

%o a(n) = gpf(core(n)); \\ _Michel Marcus_, Mar 08 2018

%o (Magma) [#f eq 0 select 1 else f[#f][1] where f is Factorization(Squarefree(n)): n in [1..90]]; // _Vincenzo Librandi_, Mar 08 2018

%Y Cf. A006530, A007913.

%K nonn

%O 1,2

%A _Peter Kagey_, Mar 07 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 3 12:19 EDT 2024. Contains 373060 sequences. (Running on oeis4.)