The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A179255 Number of partitions of n into distinct parts such that the successive differences of consecutive parts are nondecreasing. 11

%I

%S 1,1,1,2,2,3,4,5,5,8,9,10,13,15,16,22,24,26,33,36,39,50,54,58,70,77,

%T 83,100,109,116,137,150,159,186,202,216,249,270,288,328,355,379,428,

%U 462,491,554,597,633,707,760,807,899,964,1020,1127,1211,1282,1412,1512,1596,1750,1873,1976,2160,2305,2434,2652,2826,2978

%N Number of partitions of n into distinct parts such that the successive differences of consecutive parts are nondecreasing.

%C Partitions into distinct parts (p(1), p(2), ..., p(m)) such that p(k-1) - p(k-2) <= p(k) - p(k-1) for all k >= 3.

%H Fausto A. C. Cariboni, <a href="/A179255/b179255.txt">Table of n, a(n) for n = 0..1000</a> (terms 0..241 from Joerg Arndt)

%e There are a(17) = 26 such partitions of 17:

%e 01: [ 1 2 3 4 7 ]

%e 02: [ 1 2 3 11 ]

%e 03: [ 1 2 4 10 ] *

%e 04: [ 1 2 5 9 ] *

%e 05: [ 1 2 14 ] *

%e 06: [ 1 3 5 8 ]

%e 07: [ 1 3 13 ] *

%e 08: [ 1 4 12 ] *

%e 09: [ 1 5 11 ] *

%e 10: [ 1 16 ] *

%e 11: [ 2 3 4 8 ]

%e 12: [ 2 3 5 7 ]

%e 13: [ 2 3 12 ] *

%e 14: [ 2 4 11 ] *

%e 15: [ 2 5 10 ] *

%e 16: [ 2 15 ] *

%e 17: [ 3 4 10 ] *

%e 18: [ 3 5 9 ] *

%e 19: [ 3 14 ] *

%e 20: [ 4 5 8 ] *

%e 21: [ 4 13 ] *

%e 22: [ 5 12 ] *

%e 23: [ 6 11 ] *

%e 24: [ 7 10 ] *

%e 25: [ 8 9 ] *

%e 26: [ 17 ] *

%e The 21 partitions marked with * have strictly increasing differences, see the example for A179254.

%e - _Joerg Arndt_, Mar 31 2014

%o (Sage)

%o def A179255(n):

%o has_nondecreasing_diffs = lambda x: min(differences(x,2)) >= 0

%o allowed = lambda x: len(x) < 3 or has_nondecreasing_diffs(x)

%o return len([x for x in Partitions(n,max_slope=-1) if allowed(x[::-1])])

%o # _D. S. McNeil_, Jan 06 2011

%o (Ruby)

%o def partition(n, min, max)

%o return [[]] if n == 0

%o [max, n].min.downto(min).flat_map{|i| partition(n - i, min, i - 1).map{|rest| [i, *rest]}}

%o end

%o def f(n)

%o return 1 if n == 0

%o cnt = 0

%o partition(n, 1, n).each{|ary|

%o ary0 = (1..ary.size - 1).map{|i| ary[i - 1] - ary[i]}

%o cnt += 1 if ary0.sort == ary0.reverse

%o }

%o cnt

%o end

%o def A179255(n)

%o (0..n).map{|i| f(i)}

%o end

%o p A179255(50) # _Seiichi Manyama_, Oct 12 2018

%Y Cf. A009994.

%Y Cf. A179254 (strictly increasing differences), A179269, A007294.

%Y Cf. A240026 (partitions with nondecreasing differences), A240027 (partitions with strictly increasing differences), A320382.

%K nonn

%O 0,4

%A _Joerg Arndt_, Jan 05 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 13 09:54 EDT 2021. Contains 344981 sequences. (Running on oeis4.)