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.

A320510 Number of partitions of n such that the successive differences of consecutive parts are decreasing, and first difference < first part.

This page as a plain text file.
%I A320510 #26 Jan 09 2021 07:29:49
%S A320510 1,1,2,1,2,2,2,2,4,2,3,4,3,4,6,3,5,6,5,6,9,5,7,9,8,8,11,8,11,13,10,12,
%T A320510 15,11,15,16,14,16,21,15,20,22,18,21,26,21,24,28,25,28,33,26,32,34,33,
%U A320510 36,40,34,40,45,40,43,49,43,52,54,49,54,62,56,62,64,61,67,75,66
%N A320510 Number of partitions of n such that the successive differences of consecutive parts are decreasing, and first difference < first part.
%C A320510 Partitions are usually written with parts in descending order, but the conditions are easier to check visually if written in ascending order.
%C A320510 The differences of a sequence are defined as if the sequence were increasing, so for example the differences of (6,3,1) (with the last part taken to be 0) are (-3,-2,-1). Then a(n) is the number of integer partitions of n whose differences (with the last part taken to be 0) are strictly decreasing. The Heinz numbers of these partitions are given by A325461. Of course, the number of such integer partitions of n is also the number of reversed integer partitions of n whose differences are strictly decreasing, which is the author's interpretation. - _Gus Wiseman_, May 04 2019
%H A320510 Fausto A. C. Cariboni, <a href="/A320510/b320510.txt">Table of n, a(n) for n = 0..2000</a> (terms 0..300 from Seiichi Manyama)
%H A320510 Gus Wiseman, <a href="/A325325/a325325.txt">Sequences counting and ranking integer partitions by the differences of their successive parts.</a>
%e A320510 There are a(29) = 13 such partitions of 29:
%e A320510 01: [29]
%e A320510 02: [10, 19]
%e A320510 03: [11, 18]
%e A320510 04: [12, 17]
%e A320510 05: [13, 16]
%e A320510 06: [14, 15]
%e A320510 07: [6, 10, 13]
%e A320510 08: [6, 11, 12]
%e A320510 09: [7, 10, 12]
%e A320510 10: [7, 11, 11]
%e A320510 11: [8, 10, 11]
%e A320510 12: [9, 10, 10]
%e A320510 13: [4, 7, 9, 9]
%e A320510 There are a(30) = 10 such partitions of 30:
%e A320510 01: [30]
%e A320510 02: [11, 19]
%e A320510 03: [12, 18]
%e A320510 04: [13, 17]
%e A320510 05: [14, 16]
%e A320510 06: [15, 15]
%e A320510 07: [6, 11, 13]
%e A320510 08: [7, 11, 12]
%e A320510 09: [8, 11, 11]
%e A320510 10: [4, 7, 9, 10]
%t A320510 Table[Length[Select[IntegerPartitions[n],Greater@@Differences[Append[#,0]]&]],{n,0,30}] (* _Gus Wiseman_, May 04 2019 *)
%o A320510 (Ruby)
%o A320510 def partition(n, min, max)
%o A320510   return [[]] if n == 0
%o A320510   [max, n].min.downto(min).flat_map{|i| partition(n - i, min, i).map{|rest| [i, *rest]}}
%o A320510 end
%o A320510 def f(n)
%o A320510   return 1 if n == 0
%o A320510   cnt = 0
%o A320510   partition(n, 1, n).each{|ary|
%o A320510     ary << 0
%o A320510     ary0 = (1..ary.size - 1).map{|i| ary[i - 1] - ary[i]}
%o A320510     cnt += 1 if ary0.sort == ary0 && ary0.uniq == ary0
%o A320510   }
%o A320510   cnt
%o A320510 end
%o A320510 def A320510(n)
%o A320510   (0..n).map{|i| f(i)}
%o A320510 end
%o A320510 p A320510(50)
%Y A320510 Cf. A240026, A240027, A320466, A320470, A320509.
%Y A320510 Cf. A320385 (distinct parts, decreasing, and first difference < first part).
%Y A320510 Cf. A007294, A007862, A325324, A325358, A325393, A325461.
%K A320510 nonn
%O A320510 0,3
%A A320510 _Seiichi Manyama_, Oct 14 2018