A368572 Number of refactorable numbers less than n that do not divide n.
0, 0, 1, 0, 1, 0, 1, 0, 2, 2, 3, 2, 4, 3, 4, 2, 4, 2, 5, 4, 5, 4, 5, 2, 6, 5, 5, 5, 6, 5, 6, 4, 6, 5, 6, 2, 7, 6, 7, 5, 8, 7, 8, 7, 7, 7, 8, 4, 8, 7, 8, 7, 8, 5, 8, 6, 9, 8, 9, 7, 10, 9, 9, 8, 10, 9, 10, 9, 10, 9, 10, 3, 11, 10, 11, 10, 11, 10, 11, 8, 11, 11, 12, 10
Offset: 1
Examples
a(15) = 4 since there are 4 refactorable numbers that are less than 15 and do not divide 15, namely: 2, 8, 9, 12.
Programs
-
Mathematica
Table[Sum[(1 - Ceiling[k/DivisorSigma[0, k]] + Floor[k/DivisorSigma[0, k]]) (Ceiling[n/k] - Floor[n/k]), {k, n}], {n, 100}]
Formula
a(n) = Sum_{k=1..n} c(k) * (ceiling(n/k) - floor(n/k)), where c = A336040.