%I #35 Oct 02 2024 04:45:12
%S 0,1,1,2,1,1,1,3,2,1,1,1,1,1,1,4,1,2,1,1,1,1,1,1,2,1,3,1,1,1,1,5,1,1,
%T 1,2,1,1,1,1,1,1,1,1,1,1,1,1,2,2,1,1,1,3,1,1,1,1,1,1,1,1,1,6,1,1,1,1,
%U 1,1,1,2,1,1,2,1,1,1,1,1,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,1,1,1,1
%N Exponent of the largest prime factor of n.
%C a(n) = the multiplicity of the largest part in the partition having Heinz number n. We define the Heinz number of a partition p = [p_1, p_2, ..., p_r] as Product(p_j-th prime, j=1...r) (concept used by _Alois P. Heinz_ in A215366 as an "encoding" of a partition). For example, for the partition [1, 1, 2, 4, 10] we get 2*2*3*7*29 = 2436. Example: a(18) = 2; indeed, the partition having Heinz number 18 = 2*3*3 is [1,2,2]. - _Emeric Deutsch_, Jun 04 2015
%H Reinhard Zumkeller, <a href="/A071178/b071178.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A124010(n, A001221(n)); A053585(n) = A006530(n)^a(n). - _Reinhard Zumkeller_, Aug 27 2011
%F a(n) = A067255(n, A001222(n)). - _Reinhard Zumkeller_, Jun 11 2013
%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1 (since the asymptotic density of A070003 is 0). - _Amiram Eldar_, Oct 02 2024
%p with(numtheory): with(padic):
%p a:= n-> `if`(n=1, 0, ordp(n, max(factorset(n)[]))):
%p seq(a(n), n=1..120); # _Alois P. Heinz_, Jun 04 2015
%t a[n_] := FactorInteger[n] // Last // Last; Table[a[n], {n, 1, 120}] (* _Jean-François Alcover_, Jun 12 2015 *)
%o (Haskell)
%o a071178 = last . a124010_row -- _Reinhard Zumkeller_, Aug 27 2011
%o (Python)
%o from sympy import factorint
%o def A071178(n): return max(factorint(n).items())[1] if n>1 else 0 # _Chai Wah Wu_, Oct 10 2023
%o (PARI) a(n) = if(n == 1, 0, my(e = factor(n)[, 2]); e[#e]); \\ _Amiram Eldar_, Oct 02 2024
%Y Cf. A001221, A001222, A006530, A053585, A067029, A067255, A070003, A124010, A215366.
%K easy,nonn
%O 1,4
%A _Benoit Cloitre_, Jun 10 2002