login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A292786
a(n) = psi(n) - phi(n).
4
0, 2, 2, 4, 2, 10, 2, 8, 6, 14, 2, 20, 2, 18, 16, 16, 2, 30, 2, 28, 20, 26, 2, 40, 10, 30, 18, 36, 2, 64, 2, 32, 28, 38, 24, 60, 2, 42, 32, 56, 2, 84, 2, 52, 48, 50, 2, 80, 14, 70, 40, 60, 2, 90, 32, 72, 44, 62, 2, 128, 2, 66, 60, 64, 36, 124, 2, 76, 52, 120, 2, 120, 2, 78, 80, 84, 36, 144
OFFSET
1,2
COMMENTS
Even numbers that are not the terms of this sequence are 12, 102, 114, 130, ...
LINKS
FORMULA
a(n) = A001615(n) - A000010(n).
a(n) = 2 iff n is prime.
a(n) = 2*A069359(n) iff n is in A070915.
Sum_{k=1..n} a(k) = c * n^2 + O(n*log(n)), where c = 9/(2*Pi^2) = 0.455945... (A088245). - Amiram Eldar, Dec 05 2023
MATHEMATICA
psi[n_] := If[n < 1, 0, n Sum[ MoebiusMu[d]^2/d, {d, Divisors@ n}]]; Array[psi@# - EulerPhi@# &, 87] (* Robert G. Wilson v, Sep 23 2017 *)
PROG
(PARI) a001615(n) = my(f=factor(n)); prod(i=1, #f~, f[i, 1]^f[i, 2] + f[i, 1]^(f[i, 2]-1));
a(n) = a001615(n) - eulerphi(n); \\ after Charles R Greathouse IV at A001615
KEYWORD
nonn,easy,look
AUTHOR
Altug Alkan, Sep 23 2017
STATUS
approved