|
|
A366979
|
|
Number of divisors of n less than or equal to d(n).
|
|
1
|
|
|
1, 2, 1, 2, 1, 3, 1, 3, 2, 2, 1, 5, 1, 2, 2, 3, 1, 4, 1, 4, 2, 2, 1, 6, 1, 2, 2, 3, 1, 5, 1, 3, 2, 2, 1, 6, 1, 2, 2, 5, 1, 5, 1, 3, 3, 2, 1, 6, 1, 3, 2, 3, 1, 4, 1, 5, 2, 2, 1, 8, 1, 2, 2, 3, 1, 4, 1, 3, 2, 4, 1, 8, 1, 2, 3, 3, 1, 4, 1, 6, 2, 2, 1, 7, 1, 2, 2, 4, 1, 7
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
First differs from A126131 at a(25) = 1.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Sum_{d|n, d <= d(n)} 1.
a(n) = 1 + Sum_{d|n} (Sum_{i=2..d(n)} ( sign(floor(i/d)) - sign(floor((i-1)/d)) )), where d(n) is the number of divisors of n (A000005).
|
|
EXAMPLE
|
a(8) = 3; There are 3 divisors of 8 that are <= d(8) = 4. They are: {1,2,4}.
a(25) = 1; 1 is the only divisor of 25 that is <= d(25) = 3.
|
|
MATHEMATICA
|
Table[1 + Sum[Sum[(Sign[Floor[i/k]] - Sign[Floor[(i - 1)/k]]), {i, 2, DivisorSigma[0, n]}] (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 100}]
|
|
PROG
|
(PARI) a(n) = my(nd=numdiv(n)); sumdiv(n, d, d <= nd); \\ Michel Marcus, Oct 30 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|