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.

A364673 Number of (necessarily strict) integer partitions of n containing all of their own first differences.

This page as a plain text file.
%I A364673 #15 Mar 09 2024 19:18:48
%S A364673 1,1,1,2,1,1,3,2,1,2,2,2,5,2,2,4,2,3,6,4,4,8,4,4,10,8,7,8,13,9,15,12,
%T A364673 13,17,20,15,31,24,27,32,33,32,50,42,45,53,61,61,85,76,86,101,108,118,
%U A364673 137,141,147,179,184,196,222,244,257,295,324,348,380,433
%N A364673 Number of (necessarily strict) integer partitions of n containing all of their own first differences.
%H A364673 John Tyler Rascoe, <a href="/A364673/b364673.txt">Table of n, a(n) for n = 0..200</a>
%e A364673 The partition y = (12,6,3,2,1) has differences (6,3,1,1), and {1,3,6} is a subset of {1,2,3,6,12}, so y is counted under a(24).
%e A364673 The a(n) partitions for n = 1, 3, 6, 12, 15, 18, 21:
%e A364673   (1)  (3)    (6)      (12)       (15)         (18)         (21)
%e A364673        (2,1)  (4,2)    (8,4)      (10,5)       (12,6)       (14,7)
%e A364673               (3,2,1)  (6,4,2)    (8,4,2,1)    (9,6,3)      (12,6,3)
%e A364673                        (5,4,2,1)  (5,4,3,2,1)  (6,5,4,2,1)  (8,6,4,2,1)
%e A364673                        (6,3,2,1)               (7,5,3,2,1)  (9,5,4,2,1)
%e A364673                                                (8,4,3,2,1)  (9,6,3,2,1)
%e A364673                                                             (10,5,3,2,1)
%e A364673                                                             (6,5,4,3,2,1)
%t A364673 Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&SubsetQ[#,-Differences[#]]&]],{n,0,30}]
%o A364673 (Python)
%o A364673 from collections import Counter
%o A364673 def A364673_list(maxn):
%o A364673     count = Counter()
%o A364673     for i in range(maxn//3):
%o A364673         A,f,i = [[(i+1, )]],0,0
%o A364673         while f == 0:
%o A364673             A.append([])
%o A364673             for j in A[i]:
%o A364673                 for k in j:
%o A364673                     x = j + (j[-1] + k, )
%o A364673                     y = sum(x)
%o A364673                     if y <= maxn:
%o A364673                         A[i+1].append(x)
%o A364673                         count.update({y})
%o A364673             if len(A[i+1]) < 1: f += 1
%o A364673             i += 1
%o A364673     return [count[z]+1 for z in range(maxn+1)] # _John Tyler Rascoe_, Mar 09 2024
%Y A364673 Containing all differences: A007862.
%Y A364673 Containing no differences: A364464, strict complement A364536.
%Y A364673 Containing at least one difference: A364467, complement A363260.
%Y A364673 For subsets of {1..n} we have A364671, complement A364672.
%Y A364673 A non-strict version is A364674.
%Y A364673 For submultisets instead of subsets we have A364675.
%Y A364673 A000041 counts integer partitions, strict A000009.
%Y A364673 A008284 counts partitions by length, strict A008289.
%Y A364673 A236912 counts sum-free partitions w/o re-used parts, complement A237113.
%Y A364673 A325325 counts partitions with distinct first differences.
%Y A364673 Cf. A002865, A025065, A196723, A229816, A237667, A320347, A363225, A364272, A364345, A364463, A364537, A370386.
%K A364673 nonn
%O A364673 0,4
%A A364673 _Gus Wiseman_, Aug 03 2023