OFFSET
1,8
COMMENTS
Trivially, there is only one run of three consecutive 0's. However, there are infinitely many runs of three consecutive 1's and they are at positions A056809(n), A086005(n), and A115393(n) for n >= 1. - Timothy L. Tiffin, Jun 21 2021
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A033273(n) - 1.
G.f.: -x/(1 - x) + Sum_{k>=1} (x^k - x^prime(k))/((1 - x^k)*(1 - x^prime(k))). - Ilya Gutkovskiy, Mar 21 2017
Sum_{k=1..n} a(k) ~ n*log(n) - n*log(log(n)) + (2*gamma - 2 - B)*n, where gamma is Euler's constant (A001620) and B is Mertens's constant (A077761). - Amiram Eldar, Dec 07 2023
EXAMPLE
a[20] = 3 because the composite divisors of 20 are 4, 10, 20.
MATHEMATICA
Table[ Count[ PrimeQ[ Divisors[n] ], False] - 1, {n, 1, 105} ]
Table[Count[Divisors[n], _?CompositeQ], {n, 120}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 09 2018 *)
a[n_] := DivisorSigma[0, n] - PrimeNu[n] - 1; Array[a, 100] (* Amiram Eldar, Jun 18 2022 *)
PROG
(Haskell)
a055212 = subtract 1 . a033273 -- Reinhard Zumkeller, Sep 15 2015
(PARI) a(n) = numdiv(n) - omega(n) - 1; \\ Michel Marcus, Oct 17 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Jun 23 2000
STATUS
approved