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.
%I A309128 #26 Mar 19 2022 12:45:57 %S A309128 1,1,4,4,12,20,40,70,150,284,564,1116,2212,4392,8768,17404,34704, %T A309128 69214,137980,275264,549340,1096244,2188344,4369196,8724196,17422500, %U A309128 34797476,69505628,138845940,277383904,554189344,1107296248,2212559996,4421289872,8835361488 %N A309128 (1/n) times the sum of the elements of all subsets of [n] whose sum is divisible by n. %H A309128 Alois P. Heinz, <a href="/A309128/b309128.txt">Table of n, a(n) for n = 1..1000</a> %F A309128 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 %F A309128 a(n) = A309280(n,n). - _Alois P. Heinz_, Jul 21 2019 %e A309128 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. %p A309128 b:= proc(n, m, s) option remember; `if`(n=0, [`if`(s=0, 1, 0), 0], %p A309128 b(n-1, m, s) +(g-> g+[0, g[1]*n])(b(n-1, m, irem(s+n, m)))) %p A309128 end: %p A309128 a:= proc(n) option remember; forget(b); b(n$2, 0)[2]/n end: %p A309128 seq(a(n), n=1..40); %t A309128 b[n_, m_, s_] := b[n, m, s] = If[n == 0, {If[s == 0, 1, 0], 0}, %t A309128 b[n-1, m, s] + Function[g, g+{0, g[[1]] n}][b[n-1, m, Mod[s+n, m]]]]; %t A309128 a[n_] := b[n, n, 0][[2]]/n; %t A309128 Table[a[n], {n, 1, 40}] (* _Jean-François Alcover_, Mar 19 2022, after _Alois P. Heinz_ *) %Y A309128 Cf. A000010, A001792 (the same for all subsets), A053636, A063776, A309122, A309280. %K A309128 nonn %O A309128 1,3 %A A309128 _Alois P. Heinz_, Jul 13 2019