cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A340261 #10 Jan 03 2021 04:34:36
%S A340261 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,
%T A340261 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,
%U A340261 0,0,1,1,2,3,4,5,6,6,0,1,2,3,4,5,6,7,8,9,10,11,11
%N 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.
%F A340261 T(n, k) = Sum_{j=1..k} [n mod j <> 0], where [ ] are the Iverson brackets.
%F A340261 T(n, k) = card({j : j = 1..k} \ divisors(n)).
%e A340261 Table starts:
%e A340261                             [1] 0;
%e A340261                            [2] 0, 0;
%e A340261                           [3] 0, 1, 1;
%e A340261                         [4] 0, 0, 1, 1;
%e A340261                        [5] 0, 1, 2, 3, 3;
%e A340261                      [6] 0, 0, 0, 1, 2, 2;
%e A340261                     [7] 0, 1, 2, 3, 4, 5, 5;
%e A340261                   [8] 0, 0, 1, 1, 2, 3, 4, 4;
%e A340261                  [9] 0, 1, 1, 2, 3, 4, 5, 6, 6;
%e A340261                [10] 0, 0, 1, 2, 2, 3, 4, 5, 6, 6;
%p A340261 IversonBrackets := expr -> subs(true=1, false=0, evalb(expr)):
%p A340261 T := (n, k) -> add(IversonBrackets(irem(n, j) <> 0), j = 1..k):
%p A340261 # Alternative:
%p A340261 T := (n, k) -> nops({seq(j, j = 1..k)} minus numtheory:-divisors(n)):
%p A340261 for n from 1 to 19 do seq(T(n, k), k = 1..n) od;
%Y A340261 T(n, n) = n - tau(n) = A049820(n).
%Y A340261 T(2*n, n) = n + 1 - tau(2*n) = A234306(n).
%Y A340261 Cf. A000005, A051731, A243987, A340260.
%K A340261 nonn,tabl
%O A340261 1,13
%A A340261 _Peter Luschny_, Jan 02 2021