%I #6 Dec 20 2020 22:23:51
%S 0,0,0,1,0,1,0,1,1,1,0,1,0,2,1,1,0,2,0,1,1,2,0,1,1,2,1,1,0,1,0,1,1,1,
%T 2,2,0,2,2,1,0,2,0,2,2,2,0,1,1,2,1,1,0,2,2,2,1,2,0,1,0,3,2,1,1,1,0,1,
%U 1,1,0,2,0,2,2,2,2,2,0,1,1,2,0,2,1,3,2,2,0,2,1,2,2,2,2,1,0,3,3,2,0,1,0,2,2
%N Number of primes p for which the p-adic valuation of phi(n) exceeds the p-adic valuation of n-1, with a(1) = 0 by convention.
%H Antti Karttunen, <a href="/A339871/b339871.txt">Table of n, a(n) for n = 1..65537</a>
%F a(n) = A001221(A160595(n)).
%F a(n) <= A055734(n).
%o (PARI) A339871(n) = if(1==n,0,my(s=0); for(k=1,n,my(p=prime(k)); if(valuation(eulerphi(n),p)>valuation(n-1,p), s++)); (s));
%o (PARI) A339871(n) = if(1==n,0,my(f=factor(eulerphi(n))); sum(i=1,#f~,f[i,2]>valuation(n-1,f[i,1])));
%o (PARI) A339871(n) = omega(eulerphi(n)/gcd(n-1,eulerphi(n)));
%Y Cf. A001221, A055734, A160595, A339817, A339872.
%K nonn
%O 1,14
%A _Antti Karttunen_, Dec 20 2020