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!)
A088387 Prime corresponding to largest prime power factor of n, a(1)=1. 10

%I #84 Apr 18 2023 02:47:10

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

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

%U 19,29,59,5,61,31,3,2,13,11,67,17,23,7,71,3,73,37,5,19,11,13,79,2,3,41,83,7,17

%N Prime corresponding to largest prime power factor of n, a(1)=1.

%C Most significant prime factor of n: If n = (p_1^e_1)(p_2^e_2)(p_3^e_3)... and max(p_1^e_1,p_2^e_2,...) = p_k^e_k then a(n) = p_k.

%H Antti Karttunen, <a href="/A088387/b088387.txt">Table of n, a(n) for n = 1..65537</a>

%F A034699(n) = a(n)^A088388(n).

%F a(n*a(n)) = a(n). - _Sam Alexander_, Dec 15 2003

%e a(6) = a(2*3) = 3 because 3^1 > 2^1;

%e a(36) = a((2^2)(3^2)) = 3 because 3^2 > 2^2;

%e a(12) = a((2^2)*3) = 2 because 2^2 > 3^1.

%t f[n_] := Sort[ {#[[1]]^#[[2]], #[[1]]} & /@ FactorInteger@ n][[ -1, 2]]; Array[f, 85] (* _Robert G. Wilson v_, Nov 05 2007 *)

%t a[n_] := MaximalBy[FactorInteger[n], Power @@ # &][[1, 1]];

%t Array[a, 85] (* _Jean-François Alcover_, Jun 27 2019 *)

%o (PARI) A088387(n) = if(1==n,1,my(f=factor(n),p=0); isprimepower(vecmax(vector(#f[, 1], i, f[i, 1]^f[i, 2])),&p); (p)); \\ _Antti Karttunen_, Jul 22 2018

%o (Python)

%o from sympy import factorint

%o def A088387(n): return max(((p**e,p) for p, e in factorint(n).items()), default=(0,1))[1] # _Chai Wah Wu_, Apr 17 2023

%Y Cf. A034699, A088388, A307746, A307641.

%K easy,nonn

%O 1,2

%A _Reinhard Zumkeller_, Sep 28 2003

%E More terms from _Ray Chandler_, Dec 20 2003

%E Edited by _N. J. A. Sloane_ at the suggestion of _Stefan Steinerberger_, Nov 04 2007

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 April 24 18:05 EDT 2024. Contains 371962 sequences. (Running on oeis4.)