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 A237984 #12 Sep 22 2023 01:59:00 %S A237984 1,2,2,3,2,5,2,6,5,8,2,21,2,14,22,30,2,61,2,86,67,45,2,283,66,80,197, %T A237984 340,2,766,2,663,543,234,703,2532,2,388,1395,4029,2,4688,2,4476,7032, %U A237984 1005,2,17883,2434,9713,7684,14472,2,25348,17562,37829,16786,3721 %N A237984 Number of partitions of n whose mean is a part. %C A237984 a(n) = 2 if and only if n is a prime. %F A237984 a(n) = A000041(n) - A327472(n). - _Gus Wiseman_, Sep 14 2019 %e A237984 a(6) counts these partitions: 6, 33, 321, 222, 111111. %e A237984 From _Gus Wiseman_, Sep 14 2019: (Start) %e A237984 The a(1) = 1 through a(10) = 8 partitions (A = 10): %e A237984 1 2 3 4 5 6 7 8 9 A %e A237984 11 111 22 11111 33 1111111 44 333 55 %e A237984 1111 222 2222 432 22222 %e A237984 321 3221 531 32221 %e A237984 111111 4211 111111111 33211 %e A237984 11111111 42211 %e A237984 52111 %e A237984 1111111111 %e A237984 (End) %t A237984 Table[Count[IntegerPartitions[n], p_ /; MemberQ[p, Mean[p]]], {n, 40}] %o A237984 (Python) %o A237984 from sympy.utilities.iterables import partitions %o A237984 def A237984(n): return sum(1 for s,p in partitions(n,size=True) if not n%s and n//s in p) # _Chai Wah Wu_, Sep 21 2023 %Y A237984 Cf. A238478. %Y A237984 The Heinz numbers of these partitions are A327473. %Y A237984 A similar sequence for subsets is A065795. %Y A237984 Dominated by A067538. %Y A237984 The strict case is A240850. %Y A237984 Partitions without their mean are A327472. %Y A237984 Cf. A000016, A316413, A324753, A325705, A327478, A327482. %K A237984 nonn,easy %O A237984 1,2 %A A237984 _Clark Kimberling_, Feb 27 2014