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 A276107 #40 Sep 20 2023 19:46:09 %S A276107 1,1,1,2,3,5,6,11,14,22,25,43,53,79,89,140,167,243,278,409,480,666, %T A276107 760,1082,1273,1708,1948,2649,3089,4073,4682,6180,7177,9213,10565, %U A276107 13660,15869,19987,22911,29012,33601,41762,47942,59571,68756,84240,96570,118641 %N A276107 Number of partitions of n which can themselves be subdivided into two partitions whose sums differ by 1 at most. %C A276107 Number of partitions whose summands can be divided into two sets whose sums are equal, or whose sums differ by one. %H A276107 Alois P. Heinz, <a href="/A276107/b276107.txt">Table of n, a(n) for n = 0..115</a> (first 77 terms from Chai Wah Wu) %F A276107 a(n) = A000041(n) - A046663(n,floor(n/2)). - _Max Alekseyev_, Oct 17 2022 %e A276107 For example: the partition of 6 into 2+2+2 is not counted because no subset of {2,2,2} has the sum 3. The partition of 6 into 3+2+1 is counted because {3,2,1} can be divided into two subsets {3} and {2,1} each of which has sum 3. The partition of 7 into 4+2+1 is counted because {4,2,1} can be broken up into sets {4} and {2,1} the sum of whose elements differ by one. %p A276107 N:= 50: # to get a(0) .. a(N) %p A276107 Pm1:= combinat:-partition(0); %p A276107 for m from 0 to N/2 do %p A276107 Pm:= Pm1; %p A276107 A[2*m]:= nops({seq(seq(sort([op(Pm[i]),op(Pm[j])]),j=1..i),i=1..nops(Pm))}); %p A276107 if 2*m+1 > N then break fi; %p A276107 Pm1:= combinat:-partition(m+1); %p A276107 A[2*m+1]:= nops({seq(seq(sort([op(Pm[i]),op(Pm1[j])]),j=1..nops(Pm1)),i=1..nops(Pm))}); %p A276107 od: %p A276107 seq(A[i],i= 0..N); # _Robert Israel_, Aug 18 2016 %o A276107 (Python) %o A276107 from collections import Counter %o A276107 from sympy.utilities.iterables import partitions %o A276107 def A276107(n): return len({tuple(sorted((p+q).items())) for p in (Counter(p) for p in partitions(n>>1)) for q in (Counter(q) for q in partitions(n+1>>1))}) # _Chai Wah Wu_, Sep 20 2023 %Y A276107 Cf. A000041, A002219, A046663. %K A276107 nonn %O A276107 0,4 %A A276107 _David S. Newman_, Aug 18 2016 %E A276107 a(11)-a(47) from _Alois P. Heinz_, Aug 18 2016