OFFSET
1,2
LINKS
FORMULA
PROG
(PARI)
A354200(n) = if(1==n, 5, my(p=prime(n), m=p%4); forprime(q=1+p, , if(m==(q%4), return(q))));
A354204(n) = { my(f=factor(n)); for(k=1, #f~, f[k, 1] = A354200(primepi(f[k, 1]))); eulerphi(factorback(f)); };
\\ Alternatively:
A354204v2(n) = { my(f=factor(n), q); prod(k=1, #f~, q = A354200(primepi(f[k, 1])); (q-1)*(q^(f[k, 2]-1))); };
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Antti Karttunen, May 23 2022
STATUS
approved