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 A353851 #18 Sep 09 2022 15:25:15 %S A353851 1,1,2,2,5,2,8,2,12,5,8,2,34,2,8,8,43,2,52,2,70,8,8,2,282,5,8,18,214, %T A353851 2,386,2,520,8,8,8,1957,2,8,8,2010,2,2978,2,3094,94,8,2,16764,5,340,8, %U A353851 12310,2,26514,8,27642,8,8,2,132938,2,8,238,107411,8,236258 %N A353851 Number of integer compositions of n with all equal run-sums. %C A353851 Every sequence can be uniquely split into a sequence of non-overlapping runs. For example, the runs of (2,2,1,1,1,3,2,2) are ((2,2),(1,1,1),(3),(2,2)), with sums (4,3,3,4). %H A353851 David A. Corneth, <a href="/A353851/b353851.txt">Table of n, a(n) for n = 0..10000</a> %F A353851 From _David A. Corneth_, Jun 02 2022 (Start) %F A353851 a(p) = 2 for prime p. %F A353851 a(p*q) = 8 for distinct primes p and q (Cf. A006881). %F A353851 a(n) = Sum_{d|n} tau(d)*(tau(d)-1) ^ (n/d - 1) where tau = A000005. (End) %e A353851 The a(0) = 1 through a(8) = 12 compositions: %e A353851 () (1) (2) (3) (4) (5) (6) (7) (8) %e A353851 (11) (111) (22) (11111) (33) (1111111) (44) %e A353851 (112) (222) (224) %e A353851 (211) (1113) (422) %e A353851 (1111) (2112) (2222) %e A353851 (3111) (11114) %e A353851 (11211) (41111) %e A353851 (111111) (111122) %e A353851 (112112) %e A353851 (211211) %e A353851 (221111) %e A353851 (11111111) %e A353851 For example: %e A353851 (1,1,2,1,1) has run-sums (2,2,2) so is counted under a(6). %e A353851 (4,1,1,1,1,2,2) has run-sums (4,4,4) so is counted under a(12). %e A353851 (3,3,2,2,2) has run-sums (6,6) so is counted under a(12). %t A353851 Table[Length[Select[Join@@Permutations/@ IntegerPartitions[n],SameQ@@Total/@Split[#]&]],{n,0,15}] %o A353851 (PARI) a(n) = {if(n <=1, return(1)); my(d = divisors(n), res = 0); for(i = 1, #d, nd = numdiv(d[i]); res+=(nd*(nd-1)^(n/d[i]-1)) ); res } \\ _David A. Corneth_, Jun 02 2022 %Y A353851 The version for parts or runs instead of run-sums is A000005. %Y A353851 The version for multiplicities instead of run-sums is A098504. %Y A353851 All parts are divisors of n, see A100346. %Y A353851 The version for partitions is A304442, ranked by A353833. %Y A353851 The version for run-lengths instead of run-sums is A329738, ptns A047966. %Y A353851 These compositions are ranked by A353848. %Y A353851 The distinct instead of equal version is A353850. %Y A353851 A003242 counts anti-run compositions, ranked by A333489. %Y A353851 A005811 counts runs in binary expansion. %Y A353851 A011782 counts compositions. %Y A353851 A353847 represents the composition run-sum transformation. %Y A353851 For distinct instead of equal run-sums: A032020, A098859, A242882, A329739, A351013, A353837, ranked by A353838 (complement A353839), A353852, A354580, ranked by A354581. %Y A353851 Cf. A000005, A006881, A238279, A275870, A333755, A351014, A351016, A351017, A353832, A353834, A353849, A353853-A353859 (run-sum trajectory), A353860, A353863, A353864, A353932. %K A353851 nonn,easy %O A353851 0,3 %A A353851 _Gus Wiseman_, May 31 2022 %E A353851 More terms from _David A. Corneth_, Jun 02 2022