login
A340260
T(n, k) = Sum_{j=1..k} [n mod j <> 1], where [] is the Iverson bracket. Table read by rows.
2
1, 1, 2, 1, 1, 2, 1, 2, 2, 3, 1, 1, 2, 2, 3, 1, 2, 3, 4, 4, 5, 1, 1, 1, 2, 3, 3, 4, 1, 2, 3, 4, 5, 6, 6, 7, 1, 1, 2, 2, 3, 4, 5, 5, 6, 1, 2, 2, 3, 4, 5, 6, 7, 7, 8, 1, 1, 2, 3, 3, 4, 5, 6, 7, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 11, 1, 1, 1, 1, 2, 2, 3, 4, 5, 6, 7, 7, 8
OFFSET
1,3
EXAMPLE
Table starts:
[1] 1;
[2] 1, 2;
[3] 1, 1, 2;
[4] 1, 2, 2, 3;
[5] 1, 1, 2, 2, 3;
[6] 1, 2, 3, 4, 4, 5;
[7] 1, 1, 1, 2, 3, 3, 4;
[8] 1, 2, 3, 4, 5, 6, 6, 7;
[9] 1, 1, 2, 2, 3, 4, 5, 5, 6;
[10] 1, 2, 2, 3, 4, 5, 6, 7, 7, 8.
MAPLE
IversonBrackets := expr -> subs(true=1, false=0, evalb(expr)):
T := (n, k) -> add(IversonBrackets(irem(n, j) <> 1), j = 1..k):
for n from 1 to 19 do seq(T(n, k), k = 1..n) od;
CROSSREFS
T(n, n) = n + 1 - tau(n-1) for n >= 2.
Sequence in context: A243987 A050205 A281530 * A175190 A317685 A257540
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, Jan 02 2021
STATUS
approved