OFFSET
1,9
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
PROG
(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));
(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));
(PARI) A339872(n) = { my(t=eulerphi(n), x=t/gcd(n-1, t)); if(1==x, 0, primepi(factor(x)[1, 1])); };
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 20 2020
STATUS
approved