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.

Showing 1-2 of 2 results.

A309402 Number T(n,k) of nonempty subsets of [n] whose element sum is divisible by k; triangle T(n,k), n >= 1, 1 <= k <= n*(n+1)/2, read by rows.

Original entry on oeis.org

1, 3, 1, 1, 7, 3, 3, 1, 1, 1, 15, 7, 5, 3, 3, 2, 2, 1, 1, 1, 31, 15, 11, 7, 7, 5, 4, 3, 3, 3, 2, 2, 1, 1, 1, 63, 31, 23, 15, 13, 11, 9, 7, 7, 6, 5, 5, 4, 4, 4, 3, 2, 2, 1, 1, 1, 127, 63, 43, 31, 25, 21, 19, 15, 14, 12, 11, 10, 9, 9, 8, 8, 7, 7, 6, 5, 5, 4, 3, 2, 2, 1, 1, 1
Offset: 1

Views

Author

Alois P. Heinz, Jul 28 2019

Keywords

Comments

T(n,k) is defined for all n >= 0, k >= 1. The triangle contains only the positive terms. T(n,k) = 0 if k > n*(n+1)/2.

Examples

			Triangle T(n,k) begins:
   1;
   3,  1,  1;
   7,  3,  3,  1,  1,  1;
  15,  7,  5,  3,  3,  2, 2, 1, 1, 1;
  31, 15, 11,  7,  7,  5, 4, 3, 3, 3, 2, 2, 1, 1, 1;
  63, 31, 23, 15, 13, 11, 9, 7, 7, 6, 5, 5, 4, 4, 4, 3, 2, 2, 1, 1, 1;
  ...
		

Crossrefs

Column k=1 gives A000225.
Row sums give A309403.
Row lengths give A000217.
T(n,n) gives A082550.
Rows reversed converge to A000009.

Programs

  • Maple
    b:= proc(n, s) option remember; `if`(n=0, add(x^d,
          d=numtheory[divisors](s)), b(n-1, s)+b(n-1, s+n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n, 0)):
    seq(T(n), n=1..10);
  • Mathematica
    b[n_, s_] := b[n, s] = If[n == 0, Sum[x^d,
        {d, Divisors[s]}], b[n-1, s] + b[n-1, s+n]];
    T[n_] := With[{p = b[n, 0]}, Table[Coefficient[p, x, i],
        {i, 1, Exponent[p, x]}]];
    Array[T, 10] // Flatten (* Jean-François Alcover, Jan 27 2021, after Alois P. Heinz *)

Formula

Sum_{k=1..n*(n+1)/2} k * T(n,k) = A309281(n).
T(n+1,n*(n+1)/2+1) = A000009(n) for n >= 0.

A309281 Total sum of the sum of divisors of the element sum over all nonempty subsets of [n].

Original entry on oeis.org

1, 8, 37, 124, 384, 1088, 2888, 7480, 18764, 45852, 110266, 260935, 609153, 1407089, 3218496, 7298207, 16429096, 36739434, 81668800, 180586647, 397394871, 870673675, 1900033959, 4131237894, 8952390226, 19339847678, 41660216922, 89502201047, 191809609673
Offset: 1

Views

Author

Alois P. Heinz, Jul 20 2019

Keywords

Examples

			The nonempty subsets of [3] are {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3}, having element sums 1, 2, 3, 3, 4, 5, 6 with sums of divisors 1, 3, 4, 4, 7, 6, 12, having sum 37.  So a(3) = 37.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, m, s) option remember; `if`(n=0, [`if`(s=0, 1, 0), 0],
          b(n-1, m, s) +(g-> g+[0, g[1]*n])(b(n-1, m, irem(s+n, m))))
        end:
    a:= n-> add(b(n, k, 0)[2]/k, k=1..n*(n+1)/2):
    seq(a(n), n=1..22);
    # second Maple program:
    b:= proc(n, s) option remember; `if`(n=0,
          numtheory[sigma](s), b(n-1, s)+b(n-1, s+n))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=1..30);
  • Mathematica
    b[n_, s_] := b[n, s] = If[n==0, If[s==0, 0, DivisorSigma[1, s]], b[n-1, s] + b[n-1, s+n]];
    a[n_] := b[n, 0];
    Array[a, 30] (* Jean-François Alcover, Dec 20 2020, after 2nd Maple program *)

Formula

a(n) = Sum_{k=1..n*(n+1)/2} A309280(n,k).
a(n) = Sum_{k=1..2^n-1} sigma(A096137(n,k)).
a(n) = Sum_{k=1..n*(n+1)/2} sigma(k) * A053632(n,k).
a(n) = Sum_{k=1..n*(n+1)/2} k * A309402(n,k).
a(n) ~ Pi^2 * n^2 * 2^(n-3) / 3. - Vaclav Kotesovec, Aug 05 2019
Showing 1-2 of 2 results.