login
A248643
a(n) = phi(2^n) - phi(n^2), with Euler's totient function phi = A000010.
1
0, 0, -2, 0, -4, 20, 22, 96, 202, 472, 914, 2000, 3940, 8108, 16264, 32640, 65264, 130964, 261802, 524128, 1048324, 2096932, 4193798, 8388416, 16776716, 33554120, 67108378, 134217392, 268434644, 536870672, 1073740894, 2147483136, 4294966636, 8589934048, 17179868344
OFFSET
1,3
COMMENTS
phi(2^n) and phi(n^2) both are even iff n>1, therefore their sum and difference is always even.
FORMULA
a(n) = 2^(n-1) - n*phi(n) = A000079(n-1) - A002618(n). - Farideh Firoozbakht, Oct 11 2014
MAPLE
with(numtheory): A248643:=n->phi(2^n)-phi(n^2): seq(A248643(n), n=1..40); # Wesley Ivan Hurt, Feb 11 2017
MATHEMATICA
Table[EulerPhi[2^n] - EulerPhi[n^2], {n, 35}] (* Michael De Vlieger, Feb 13 2017 *)
PROG
(PARI) a(n)=2^(n-1)-n*eulerphi(n)
CROSSREFS
KEYWORD
sign
AUTHOR
M. F. Hasler, Oct 10 2014
STATUS
approved