login
A351233
a(n) = A276085(A351231(n)).
6
0, 0, 2, 3, 4, 5, 0, 7, 6, 6, 10, 11, 12, 13, 12, 14, 16, 17, 18, 19, 18, 14, 22, 23, 24, 18, 18, 25, 28, 29, 30, 31, 32, 2, 34, 32, 30, 37, 6, 38, 40, 41, 42, 43, 42, 43, 34, 47, 18, 18, 42, 44, 22, 53, 54, 54, 56, 56, 58, 59, 60, 61, 60, 61, 62, 60, 66, 67, 66, 68, 70, 71, 72, 73, 72, 69, 70, 72, 78, 79, 80, 78
OFFSET
0,3
FORMULA
a(n) = A276085(A351231(n)) = A276085(A276086(n) / gcd(A003415(n), A276086(n))).
a(n) = n - A351234(n).
PROG
(PARI)
A002110(n) = prod(i=1, n, prime(i));
A276085(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*A002110(primepi(f[k, 1])-1)); };
A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
A351231(n) = { my(u=A276086(n)); u/gcd(A003415(n), u); };
CROSSREFS
KEYWORD
nonn,base,easy,look
AUTHOR
Antti Karttunen, Feb 05 2022
STATUS
approved