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.
%I A339872 #5 Dec 20 2020 22:23:57 %S A339872 0,0,0,1,0,1,0,1,2,1,0,1,0,1,1,1,0,1,0,1,2,1,0,1,3,1,2,1,0,1,0,1,3,1, %T A339872 1,1,0,1,1,1,0,1,0,1,1,1,0,1,4,1,1,1,0,1,1,1,2,1,0,1,0,1,1,1,2,1,0,1, %U A339872 5,1,0,1,0,1,1,1,2,1,0,1,2,1,0,1,1,1,1,1,0,1,1,1,2,1,1,1,0,1,1,1,0,1,0,1,1 %N A339872 Index k of the least prime(k) such that prime(k)-adic valuation of phi(n) exceeds the prime(k)-adic valuation of n-1, or 0 if no such k exists (for example, when n = 1 or a prime). %H A339872 Antti Karttunen, <a href="/A339872/b339872.txt">Table of n, a(n) for n = 1..65537</a> %F A339872 a(n) = A055396(A160595(n)). %o A339872 (PARI) A339872(n) = if(1==n,0,for(k=1,n,my(p=prime(k)); if(valuation(eulerphi(n),p)>valuation(n-1,p), return(k))); (0)); %o A339872 (PARI) A339872(n) = if(1==n,0,my(f=factor(eulerphi(n))); for(i=1,#f~,if(f[i,2]>valuation(n-1,f[i,1]), return(primepi(f[i,1])))); (0)); %o A339872 (PARI) A339872(n) = { my(t=eulerphi(n), x=t/gcd(n-1,t)); if(1==x,0,primepi(factor(x)[1, 1])); }; %Y A339872 Cf. A055396, A160595, A339817, A339871. %K A339872 nonn %O A339872 1,9 %A A339872 _Antti Karttunen_, Dec 20 2020