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.

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

This page as a plain text file.
%I A320385 #25 Jan 07 2021 06:43:35
%S A320385 1,1,1,1,1,2,1,2,2,2,2,3,2,3,4,3,3,5,3,5,6,4,5,7,5,7,8,6,7,10,8,9,11,
%T A320385 8,11,13,9,13,15,12,14,17,13,16,20,15,18,22,18,21,25,20,23,27,23,28,
%U A320385 30,26,30,34,30,33,38,31,38,43,36,42,46,42,47,50,45,50,58,51,55
%N A320385 Number of partitions of n into distinct parts such that the successive differences of consecutive parts are decreasing, and first difference < first part.
%H A320385 Fausto A. C. Cariboni, <a href="/A320385/b320385.txt">Table of n, a(n) for n = 0..2000</a> (terms 0..300 from Seiichi Manyama)
%e A320385 There are a(29) = 10 such partitions of 29:
%e A320385 01: [29]
%e A320385 02: [10, 19]
%e A320385 03: [11, 18]
%e A320385 04: [12, 17]
%e A320385 05: [13, 16]
%e A320385 06: [14, 15]
%e A320385 07: [6, 10, 13]
%e A320385 08: [6, 11, 12]
%e A320385 09: [7, 10, 12]
%e A320385 10: [8, 10, 11]
%e A320385 There are a(30) = 8 such partitions of 30:
%e A320385 01: [30]
%e A320385 02: [11, 19]
%e A320385 03: [12, 18]
%e A320385 04: [13, 17]
%e A320385 05: [14, 16]
%e A320385 06: [6, 11, 13]
%e A320385 07: [7, 11, 12]
%e A320385 08: [4, 7, 9, 10]
%o A320385 (Ruby)
%o A320385 def partition(n, min, max)
%o A320385   return [[]] if n == 0
%o A320385   [max, n].min.downto(min).flat_map{|i| partition(n - i, min, i - 1).map{|rest| [i, *rest]}}
%o A320385 end
%o A320385 def f(n)
%o A320385   return 1 if n == 0
%o A320385   cnt = 0
%o A320385   partition(n, 1, n).each{|ary|
%o A320385     ary << 0
%o A320385     ary0 = (1..ary.size - 1).map{|i| ary[i - 1] - ary[i]}
%o A320385     cnt += 1 if ary0.sort == ary0 && ary0.uniq == ary0
%o A320385   }
%o A320385   cnt
%o A320385 end
%o A320385 def A320385(n)
%o A320385   (0..n).map{|i| f(i)}
%o A320385 end
%o A320385 p A320385(50)
%Y A320385 Cf. A007294, A179254, A179255, A179269, A320382, A320387.
%K A320385 nonn
%O A320385 0,6
%A A320385 _Seiichi Manyama_, Oct 12 2018