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 A360674 #13 Mar 09 2023 20:03:32 %S A360674 1,1,3,4,7,6,12,9,16,15,21,16,34,22,33,36,47,36,62,44,75,68,78,68,120, %T A360674 93,113,117,151,122,195,148,209,197,220,226,315,249,304,309,402,332, %U A360674 463,387,496,515,539,514,712,609,738,723,845,774,983,914,1111 %N A360674 Number of integer partitions of 2n whose left half (exclusive) and right half (inclusive) both sum to n. %C A360674 Of course, only one of the two conditions is necessary. %F A360674 a(n) = A360672(2n,n). %e A360674 The a(1) = 1 through a(6) = 12 partitions: %e A360674 (11) (22) (33) (44) (55) (66) %e A360674 (211) (321) (422) (532) (633) %e A360674 (1111) (21111) (431) (541) (642) %e A360674 (111111) (2222) (32221) (651) %e A360674 (22211) (211111111) (3333) %e A360674 (2111111) (1111111111) (33222) %e A360674 (11111111) (33321) %e A360674 (42222) %e A360674 (222222) %e A360674 (2222211) %e A360674 (21111111111) %e A360674 (111111111111) %e A360674 For example, the partition y = (3,2,2,2,1) has halves (3,2) and (2,2,1), both with sum 5, so y is counted under a(5). %t A360674 Table[Length[Select[IntegerPartitions[2n], Total[Take[#,Floor[Length[#]/2]]]==n&]],{n,0,15}] %o A360674 (Python) %o A360674 def accel_asc(n): %o A360674 a = [0 for i in range(n + 1)] %o A360674 k = 1 %o A360674 y = n - 1 %o A360674 while k != 0: %o A360674 x = a[k - 1] + 1 %o A360674 k -= 1 %o A360674 while 2 * x <= y: %o A360674 a[k] = x %o A360674 y -= x %o A360674 k += 1 %o A360674 l = k + 1 %o A360674 while x <= y: %o A360674 a[k] = x %o A360674 a[l] = y %o A360674 yield a[:k + 2] %o A360674 x += 1 %o A360674 y -= 1 %o A360674 a[k] = x + y %o A360674 y = x + y - 1 %o A360674 yield a[:k + 1] %o A360674 for y in range(1000): %o A360674 num = 0 %o A360674 for x in accel_asc(2*y): %o A360674 stop = len(x)//2+1 %o A360674 if len(x) % 2 == 0: %o A360674 stop -= 1 %o A360674 right = x[0:stop] %o A360674 left = x[stop:] %o A360674 if sum(right) == sum(left): %o A360674 num += 1 %o A360674 print(y,num) %o A360674 # _David Consiglio, Jr._, Mar 09 2023 %Y A360674 The even-length case is A000005. %Y A360674 Central diagonal of A360672. %Y A360674 These partitions have ranks A360953. %Y A360674 A008284 counts partitions by length, row sums A000041. %Y A360674 A359893 and A359901 count partitions by median. %Y A360674 First for prime indices, second for partitions, third for prime factors: %Y A360674 - A360676 gives left sum (exclusive), counted by A360672, product A361200. %Y A360674 - A360677 gives right sum (exclusive), counted by A360675, product A361201. %Y A360674 - A360678 gives left sum (inclusive), counted by A360675, product A347043. %Y A360674 - A360679 gives right sum (inclusive), counted by A360672, product A347044. %Y A360674 Cf. A237363, A360254, A360671, A360673, A360682. %K A360674 nonn %O A360674 0,3 %A A360674 _Gus Wiseman_, Mar 04 2023 %E A360674 More terms from _David Consiglio, Jr._, Mar 09 2023