cp's OEIS Frontend

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.

A365659 Number of strict integer partitions of n that either have (1) length 2, or (2) greatest part n/2.

This page as a plain text file.
%I A365659 #14 Sep 18 2023 14:09:19
%S A365659 0,0,0,1,1,2,3,3,4,4,6,5,8,6,10,7,12,8,15,9,18,10,21,11,25,12,29,13,
%T A365659 34,14,40,15,46,16,53,17,62,18,71,19,82,20,95,21,109,22,125,23,144,24,
%U A365659 165,25,189,26,217,27,248,28,283,29,324
%N A365659 Number of strict integer partitions of n that either have (1) length 2, or (2) greatest part n/2.
%C A365659 Also the number of strict integer partitions of n containing two possibly equal elements summing to n.
%F A365659 a(n) = (n-1)/2 if n is odd. a(n) = n/2 + A000009(n/2) - 2 if n is even and n > 0. - _Chai Wah Wu_, Sep 18 2023
%e A365659 The a(3) = 1 through a(11) = 5 partitions:
%e A365659   (2,1)  (3,1)  (3,2)  (4,2)    (4,3)  (5,3)    (5,4)  (6,4)    (6,5)
%e A365659                 (4,1)  (5,1)    (5,2)  (6,2)    (6,3)  (7,3)    (7,4)
%e A365659                        (3,2,1)  (6,1)  (7,1)    (7,2)  (8,2)    (8,3)
%e A365659                                        (4,3,1)  (8,1)  (9,1)    (9,2)
%e A365659                                                        (5,3,2)  (10,1)
%e A365659                                                        (5,4,1)
%t A365659 Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&(Length[#]==2||Max@@#==n/2)&]], {n,0,30}]
%o A365659 (Python)
%o A365659 from sympy.utilities.iterables import partitions
%o A365659 def A365659(n): return n>>1 if n&1 or n==0 else (m:=n>>1)+sum(1 for p in partitions(m) if max(p.values(),default=1)==1)-2 # _Chai Wah Wu_, Sep 18 2023
%Y A365659 Without repeated parts we have A140106.
%Y A365659 The non-strict version is A238628.
%Y A365659 For subsets instead of strict partitions we have A365544.
%Y A365659 A000009 counts subsets summing to n.
%Y A365659 A365046 counts combination-full subsets, differences of A364914.
%Y A365659 A365543 counts partitions of n with a submultiset summing to k.
%Y A365659 Cf. A008967, A046663, A068911, A095944, A364272, A365376, A365377.
%K A365659 nonn
%O A365659 0,6
%A A365659 _Gus Wiseman_, Sep 16 2023