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.

A340260 T(n, k) = Sum_{j=1..k} [n mod j <> 1], where [] is the Iverson bracket. Table read by rows.

Original entry on oeis.org

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

Views

Author

Peter Luschny, Jan 02 2021

Keywords

Examples

			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.
		

Crossrefs

T(n, n) = n + 1 - tau(n-1) for n >= 2.

Programs

  • 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;