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-10 of 12 results. Next

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

A309128 (1/n) times the sum of the elements of all subsets of [n] whose sum is divisible by n.

Original entry on oeis.org

1, 1, 4, 4, 12, 20, 40, 70, 150, 284, 564, 1116, 2212, 4392, 8768, 17404, 34704, 69214, 137980, 275264, 549340, 1096244, 2188344, 4369196, 8724196, 17422500, 34797476, 69505628, 138845940, 277383904, 554189344, 1107296248, 2212559996, 4421289872, 8835361488
Offset: 1

Views

Author

Alois P. Heinz, Jul 13 2019

Keywords

Examples

			The subsets of [5] whose sum is divisible by 5 are: {}, {5}, {1,4}, {2,3}, {1,4,5}, {2,3,5}, {1,2,3,4}, {1,2,3,4,5}.  The sum of their elements is 0 + 5 + 5 + 5 + 10 + 10 + 10 + 15 = 60.  So a(5) = 60/5 = 12.
		

Crossrefs

Cf. A000010, A001792 (the same for all subsets), A053636, A063776, A309122, A309280.

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:= proc(n) option remember; forget(b); b(n$2, 0)[2]/n end:
    seq(a(n), n=1..40);
  • Mathematica
    b[n_, m_, s_] := b[n, m, s] = If[n == 0, {If[s == 0, 1, 0], 0},
         b[n-1, m, s] + Function[g, g+{0, g[[1]] n}][b[n-1, m, Mod[s+n, m]]]];
    a[n_] := b[n, n, 0][[2]]/n;
    Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Mar 19 2022, after Alois P. Heinz *)

Formula

Conjecture: a(n) = (n + 1) * A063776(n)/4 - (phi(n)/2) * (1 + (-1)^n)/2 = ((n + 1)/(4*n)) * A053636(n) - (phi(n)/2) * (1 + (-1)^n)/2. - Petros Hadjicostas, Jul 20 2019
a(n) = A309280(n,n). - Alois P. Heinz, Jul 21 2019

A309294 (1/2) times the sum of the elements of all subsets of [n] whose sum is divisible by two.

Original entry on oeis.org

0, 0, 1, 6, 20, 60, 168, 448, 1152, 2880, 7040, 16896, 39936, 93184, 215040, 491520, 1114112, 2506752, 5603328, 12451840, 27525120, 60555264, 132644864, 289406976, 629145600, 1363148800, 2944401408, 6341787648, 13623099392, 29192355840, 62411243520
Offset: 0

Views

Author

Alois P. Heinz, Jul 21 2019

Keywords

Crossrefs

Column k=2 of A309280.

Programs

  • Mathematica
    LinearRecurrence[{6,-12,8},{0,0,1,6,20,60},40] (* Harvey P. Dale, Aug 27 2021 *)

Formula

G.f.: -x^2*(4*x^3-4*x^2+1)/(2*x-1)^3.

A309295 (1/3) times the sum of the elements of all subsets of [n] whose sum is divisible by three.

Original entry on oeis.org

0, 0, 1, 4, 9, 30, 84, 202, 528, 1320, 3144, 7568, 17888, 41472, 95760, 218880, 495344, 1114656, 2491584, 5534688, 12234880, 26916736, 58954752, 128629248, 279628800, 605847808, 1308632832, 2818593792, 6054720768, 12974405120, 27738383360, 59175129600
Offset: 0

Views

Author

Alois P. Heinz, Jul 21 2019

Keywords

Crossrefs

Column k=3 of A309280.

Programs

  • Mathematica
    CoefficientList[Series[-x^2(8x^8-4x^5+8x^4-10x^3+3x^2+2x-1)/((2x-1)^3(2x^3-1)^3),{x,0,40}],x] (* or *) LinearRecurrence[{6,-12,14,-36,72,-60,72,-144,104,-48,96,-64},{0,0,1,4,9,30,84,202,528,1320,3144,7568},40] (* Harvey P. Dale, Mar 17 2023 *)

Formula

G.f.: -x^2*(8*x^8-4*x^5+8*x^4-10*x^3+3*x^2+2*x-1)/((2*x-1)^3*(2*x^3-1)^3).

A309296 (1/4) times the sum of the elements of all subsets of [n] whose sum is divisible by four.

Original entry on oeis.org

0, 0, 0, 1, 4, 14, 42, 112, 288, 720, 1760, 4224, 9984, 23296, 53760, 122880, 278528, 626688, 1400832, 3112960, 6881280, 15138816, 33161216, 72351744, 157286400, 340787200, 736100352, 1585446912, 3405774848, 7298088960, 15602810880, 33285996544, 70866960384
Offset: 0

Views

Author

Alois P. Heinz, Jul 21 2019

Keywords

Crossrefs

Column k=4 of A309280.

Programs

  • Mathematica
    LinearRecurrence[{6,-12,8},{0,0,0,1,4,14,42,112,288},50] (* Harvey P. Dale, Sep 09 2019 *)

Formula

G.f.: -x^3*(8*x^5-4*x^4-2*x^3+2*x^2-2*x+1)/(2*x-1)^3.

A309297 (1/5) times the sum of the elements of all subsets of [n] whose sum is divisible by five.

Original entry on oeis.org

0, 0, 0, 1, 4, 12, 29, 71, 186, 468, 1144, 2718, 6390, 14920, 34440, 78720, 178320, 401088, 896576, 1992416, 4404288, 9689056, 21223216, 46305264, 100663680, 218104640, 471104880, 1014686160, 2179696352, 4670778048, 9985801344, 21303039648, 45354855072
Offset: 0

Views

Author

Alois P. Heinz, Jul 21 2019

Keywords

Crossrefs

Column k=5 of A309280.

Formula

G.f.: -x^3*(8*x^13+16*x^10-12*x^9+16*x^6-6*x^5-9*x^4+3*x^3+2*x-1) / ((2*x-1)^3 *(2*x^5-1)^3).

A309298 (1/6) times the sum of the elements of all subsets of [n] whose sum is divisible by six.

Original entry on oeis.org

0, 0, 0, 1, 2, 7, 20, 49, 132, 330, 786, 1892, 4472, 10368, 23940, 54720, 123836, 278664, 622896, 1383672, 3058720, 6729184, 14738688, 32157312, 69907200, 151461952, 327158208, 704648448, 1513680192, 3243601280, 6934595840, 14793782400, 31496441856, 66929938944
Offset: 0

Views

Author

Alois P. Heinz, Jul 21 2019

Keywords

Crossrefs

Column k=6 of A309280.

Programs

  • Mathematica
    CoefficientList[Series[-x^3*(96*x^16 - 80*x^15 + 8*x^14 - 140*x^13 + 112*x^12 + 12*x^11 + 40*x^10 - 36*x^9 - 32*x^8 + 32*x^7 - 14*x^6 + 20*x^5 - 21*x^4 + 12*x^3 - 7*x^2 + 4*x - 1)/((2*x - 1)^3*(2*x^3 - 1)^3), {x, 0, 40}], x] (* Wesley Ivan Hurt, Jul 23 2025 *)
    LinearRecurrence[{6,-12,14,-36,72,-60,72,-144,104,-48,96,-64},{0,0,0,1,2,7,20,49,132,330,786,1892,4472,10368,23940,54720,123836,278664,622896,1383672},40] (* Harvey P. Dale, Aug 01 2025 *)

Formula

G.f.: -x^3*(96*x^16-80*x^15+8*x^14-140*x^13+112*x^12+12*x^11 +40*x^10 -36*x^9 -32*x^8 +32*x^7 -14*x^6 +20*x^5 -21*x^4+12*x^3-7*x^2 +4*x-1) / ((2*x-1)^3 *(2*x^3-1)^3).
a(n) = 6*a(n-1) - 12*a(n-2) + 14*a(n-3) - 36*a(n-4) + 72*a(n-5) - 60*a(n-6) + 72*a(n-7) - 144*a(n-8) + 104*a(n-9) - 48*a(n-10) + 96*a(n-11) - 64*a(n-12). - Wesley Ivan Hurt, Jul 23 2025

A309299 (1/7) times the sum of the elements of all subsets of [n] whose sum is divisible by seven.

Original entry on oeis.org

0, 0, 0, 0, 2, 5, 15, 40, 97, 237, 571, 1385, 3263, 7618, 17580, 40146, 90962, 204618, 457446, 1016494, 2247000, 4943400, 10828248, 23625120, 51358776, 111277576, 240359368, 517697136, 1112090144, 2383049792, 5094795600, 10868896688, 23140232368, 49172993152
Offset: 0

Views

Author

Alois P. Heinz, Jul 21 2019

Keywords

Crossrefs

Column k=7 of A309280.

Formula

G.f.: -x^4*(8*x^18+24*x^14-12*x^12+4*x^11+16*x^10-38*x^9+49*x^8 -15*x^7 +7*x^6 -15*x^5 +3*x^4 +6*x^3 -9*x^2+7*x-2) / ((2*x-1)^3 *(2*x^7-1)^3).

A309300 (1/8) times the sum of the elements of all subsets of [n] whose sum is divisible by eight.

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 10, 27, 70, 178, 438, 1056, 2496, 5824, 13440, 30720, 69632, 156672, 350208, 778240, 1720320, 3784704, 8290304, 18087936, 39321600, 85196800, 184025088, 396361728, 851443712, 1824522240, 3900702720, 8321499136, 17716740096, 37648072704
Offset: 0

Views

Author

Alois P. Heinz, Jul 21 2019

Keywords

Crossrefs

Column k=8 of A309280.

Formula

G.f.: -x^4*(16*x^9-8*x^8+4*x^7-6*x^6+2*x^5+4*x^4-5*x^3+4*x^2-3*x+1) / (2*x-1)^3.
Showing 1-10 of 12 results. Next