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.

A375546 Triangle read by rows: T(n, k) = Sum_{d|n} d * A375467(d, k) for n > 0, T(0, 0) = 1.

Original entry on oeis.org

1, 0, 1, 0, 1, 3, 0, 1, 4, 7, 0, 1, 7, 15, 19, 0, 1, 6, 26, 41, 46, 0, 1, 12, 51, 99, 123, 129, 0, 1, 8, 78, 204, 295, 330, 337, 0, 1, 15, 135, 443, 731, 883, 931, 939, 0, 1, 13, 205, 889, 1726, 2275, 2509, 2572, 2581, 0, 1, 18, 328, 1813, 4068, 5868, 6808, 7148, 7228, 7238
Offset: 0

Views

Author

Peter Luschny, Sep 15 2024

Keywords

Examples

			Triangle starts:
  [0] 1;
  [1] 0, 1;
  [2] 0, 1,  3;
  [3] 0, 1,  4,   7;
  [4] 0, 1,  7,  15,  19;
  [5] 0, 1,  6,  26,  41,   46;
  [6] 0, 1, 12,  51,  99,  123,  129;
  [7] 0, 1,  8,  78, 204,  295,  330,  337;
  [8] 0, 1, 15, 135, 443,  731,  883,  931,  939;
  [9] 0, 1, 13, 205, 889, 1726, 2275, 2509, 2572, 2581;
		

Crossrefs

Cf. A375467, A000203 (column 2), A209397 (main diagonal), A375547 (row sums).

Programs

  • Maple
    div := n -> numtheory:-divisors(n):
    T := proc(n, k) option remember; local d; if n = 0 then 1 else
    add(d * A375467(d, k), d = div(n)) fi end:
    seq(seq(T(n, k), k = 0..n), n = 0..10):
  • Python
    from functools import cache
    @cache
    def divisors(n):
        return [d for d in range(n, 0, -1) if n % d == 0]
    @cache
    def T(n, k):
        return sum(d * r(d, k) for d in divisors(n)) if n > 0 else 1
    @cache
    def r(n, k):
        if n == 1: return int(k > 0)
        return sum(r(i, k) * T(n - i, k - 1) for i in range(1, n)) // (n - 1)
    for n in range(9): print([T(n, k) for k in range(n + 1)])