A300858 a(n) = A243823(n) - A243822(n).
0, 0, 0, 0, 0, -1, 0, 1, 1, -1, 0, -1, 0, 1, 2, 4, 0, -1, 0, 3, 4, 3, 0, 3, 3, 5, 6, 7, 0, -5, 0, 11, 6, 7, 6, 6, 0, 9, 8, 11, 0, 1, 0, 13, 12, 13, 0, 13, 5, 13, 12, 17, 0, 13, 10, 19, 14, 19, 0, 5, 0, 21, 18, 26, 12, 11, 0, 23, 18, 15, 0, 25, 0, 25, 24, 27
Offset: 1
Keywords
Examples
a(6) = -1 since the only nondivisor in the cototient of 6 is 4, which divides 6^e with e > 1; therefore 0 - 1 = -1. a(8) = 1 since the only nondivisor in the cototient of 8 is 6, and 6 does not divide 8^e with e > 1, therefore 1 - 0 = 1. Some values of a(n) and related sequences: n a(n) A243823(n) A243822(n) A272619(n) A272618(n) ------------------------------------------------------------- 1 0 0 0 - - 2 0 0 0 - - 3 0 0 0 - - 4 0 0 0 - - 5 0 0 0 - - 6 -1 0 1 - {4} 7 0 0 0 - - 8 1 1 0 {6} - 9 1 1 0 {6} - 10 -1 1 2 {6} {4,8} 11 0 0 0 - - 12 -1 1 2 {10} {8,9} 13 0 0 0 - - 14 1 3 2 {6,10,12} {4,8} 15 2 3 1 {6,10,12} {9} 16 4 4 0 {6,10,12,14} - 17 0 0 0 - - 18 -1 3 4 {10,14,15} {4,8,12,16} 19 0 0 0 - - 20 3 5 2 {6,12,14,15,18} {8,16} ...
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
f[n_] := Count[Range@ n, _?(PowerMod[n, Floor@ Log2@ n, #] == 0 &)]; Array[#1 - #3 + 1 - 2 #2 + #4 & @@ {#, f@ #, EulerPhi@ #, DivisorSigma[0, #]} &, 76]
-
PARI
a(n) = 1 + n + numdiv(n) - eulerphi(n) - 2*sum(k=1, n, if(gcd(n,k)-1, 0, moebius(k)*(n\k))); \\ Michel Marcus, Mar 17 2018
Comments