login
a(n) = A000005(n) - A008479(n).
6

%I #21 Jun 03 2024 14:26:36

%S 0,1,1,1,1,3,1,1,1,3,1,4,1,3,3,1,1,3,1,4,3,3,1,4,1,3,1,4,1,7,1,1,3,3,

%T 3,4,1,3,3,5,1,7,1,4,4,3,1,4,1,2,3,4,1,1,3,5,3,3,1,10,1,3,4,1,3,7,1,4,

%U 3,7,1,4,1,3,3,4,3,7,1,5,1,3,1,10,3,3,3

%N a(n) = A000005(n) - A008479(n).

%C A095960(50) = 3, a(50) = 2.

%C a(162) = -2 is the first negative term.

%H Michael De Vlieger, <a href="/A372720/b372720.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A095960(n) for n in A303554, i.e., for squarefree n or prime powers n.

%F a(n) = A095960(n) for n in A360767, i.e., for nonsquarefree composite n such that omega(n) > 1 and A003557(n) < A119288(n), since A008479(n) is the number of terms k in row n of A010846 such that k <= A003557(n).

%F a(n) = A183093(n) - A355432(n).

%e Table of a(n), b(n) = A000005(n), and c(n) = A008479(n) for n <= 12:

%e n b(n) c(n) a(n)

%e ------------------

%e 1 1 1 0

%e 2 2 1 1

%e 3 2 1 1

%e 4 3 2 1

%e 5 2 1 1

%e 6 4 1 3

%e 7 2 1 1

%e 8 4 3 1

%e 9 3 2 1

%e 10 4 1 3

%e 11 2 1 1

%e 12 6 2 4

%e a(12) = 4 since 12 has 6 divisors {1, 2, 3, 4, 6, 12}, and row 12 of A369609 has 2 terms {6, 12}.

%e a(18) = 3 since 18 has 6 divisors {1, 2, 3, 6, 9, 18}, and row 18 of A369609 has 3 terms {6, 12, 18}.

%e a(50) = 2 since 50 has 6 divisors {1, 2, 5, 10, 25, 50}, and row 50 of A369609 has 4 terms {10, 20, 40, 50}

%e a(162) = -2 since 162 has 10 divisors {1,2,3,6,9,18,27,54,81,162} but row 162 of A369609 has 12 terms {6,12,18,24,36,48,54,72,96,108,144,162}.

%e a(500) = 0 since 500 has as many divisors {1,2,4,5,10,20,25,50,100,125,250,500} as terms in row 500 of A369609 {10,20,40,50,80,100,160,200,250,320,400,500}.

%t rad[x_] := rad[x] = Times @@ FactorInteger[x][[All, 1]]; Table[r = rad[n]; DivisorSigma[0, n] - Count[Range[n/r], _?(Divisible[r, rad[#]] &)], {n, 120}]

%o (PARI) a(n) = my(f=factor(n)[, 1], s); forvec(v=vector(#f, i, [1, logint(n, f[i])]), if(prod(i=1, #f, f[i]^v[i])<=n, s++)); numdiv(n) - s; \\ after A008479 \\ _Michel Marcus_, Jun 03 2024

%Y Cf. A000005, A003557, A008479, A095960, A119288, A162306, A183093, A303554, A355432, A360767, A369609.

%K sign

%O 1,6

%A _Michael De Vlieger_, May 13 2024