OFFSET
1,6
COMMENTS
a(n) <= n-phi(n)-1.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
FORMULA
a(n)=Sum'_{p|n} A087623(p, n), where the sum is over all primes p < n, p | n.
a(p)=0 if p prime.
a(p^k)=p^{k-2}(p-1) if p prime, k>=2.
a(p^k q)=p^{k-2}(p-1)(p+q-1) if p, q primes (q!=p), k>=2.
a(pq)=p+q-2 if p, q primes, p!=q.
A(p^k q^h)=p^{k-2}q^{h-2}(p-1)(q-1)(p+q) if p, q primes (q!=p),
EXAMPLE
a(6)=3 because the three primes in Z_6 are 2,3,4, being 2 and 4 associates. a(500)=5(2-1)(5-1)(2+5)=140.
PROG
(PARI) A087625(n) = sumdiv(n, p, if((p<n)&&isprime(p), sum(k=1, n-1, (gcd(k, n)==p)), 0)); \\ Antti Karttunen, Mar 04 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michele Dondi (bik.mido(AT)tiscalinet.it), Sep 14 2003
EXTENSIONS
More terms from Antti Karttunen, Mar 04 2018
STATUS
approved