OFFSET
1,13
FORMULA
T(n, k) = Sum_{j=1..k} [n mod j <> 0], where [ ] are the Iverson brackets.
T(n, k) = card({j : j = 1..k} \ divisors(n)).
EXAMPLE
Table starts:
[1] 0;
[2] 0, 0;
[3] 0, 1, 1;
[4] 0, 0, 1, 1;
[5] 0, 1, 2, 3, 3;
[6] 0, 0, 0, 1, 2, 2;
[7] 0, 1, 2, 3, 4, 5, 5;
[8] 0, 0, 1, 1, 2, 3, 4, 4;
[9] 0, 1, 1, 2, 3, 4, 5, 6, 6;
[10] 0, 0, 1, 2, 2, 3, 4, 5, 6, 6;
MAPLE
IversonBrackets := expr -> subs(true=1, false=0, evalb(expr)):
T := (n, k) -> add(IversonBrackets(irem(n, j) <> 0), j = 1..k):
# Alternative:
T := (n, k) -> nops({seq(j, j = 1..k)} minus numtheory:-divisors(n)):
for n from 1 to 19 do seq(T(n, k), k = 1..n) od;
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, Jan 02 2021
STATUS
approved