A340261 T(n, k) is the number of integers that are less than or equal to k that do not divide n. Triangle read by rows, for 0 <= k <= n.
0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 2, 3, 3, 0, 0, 0, 1, 2, 2, 0, 1, 2, 3, 4, 5, 5, 0, 0, 1, 1, 2, 3, 4, 4, 0, 1, 1, 2, 3, 4, 5, 6, 6, 0, 0, 1, 2, 2, 3, 4, 5, 6, 6, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 6, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 11
Offset: 1
Examples
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;
Crossrefs
Programs
-
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;
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)).