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.

Showing 1-10 of 20 results. Next

A325325 Number of integer partitions of n with distinct differences between successive parts.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 5, 8, 11, 12, 16, 22, 21, 30, 34, 42, 49, 64, 67, 87, 95, 117, 132, 160, 169, 207, 230, 274, 301, 360, 395, 463, 506, 602, 656, 762, 834, 960, 1042, 1220, 1311, 1505, 1643, 1859, 2000, 2341, 2491, 2827, 3083, 3464, 3747, 4302, 4561, 5154
Offset: 0

Views

Author

Gus Wiseman, Apr 23 2019

Keywords

Comments

The Heinz numbers of these partitions are given by A325368.

Examples

			The a(0) = 1 through a(9) = 12 partitions:
  ()  (1)  (2)   (3)   (4)    (5)    (6)    (7)    (8)     (9)
           (11)  (21)  (22)   (32)   (33)   (43)   (44)    (54)
                       (31)   (41)   (42)   (52)   (53)    (63)
                       (211)  (221)  (51)   (61)   (62)    (72)
                              (311)  (411)  (322)  (71)    (81)
                                            (331)  (332)   (441)
                                            (421)  (422)   (522)
                                            (511)  (431)   (621)
                                                   (521)   (711)
                                                   (611)   (4221)
                                                   (4211)  (4311)
                                                           (5211)
For example, (5,2,1,1) has differences (-3,-1,0), which are distinct, so (5,2,1,1) is counted under a(9).
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@Differences[#]&]],{n,0,30}]

A049988 Number of nondecreasing arithmetic progressions of positive integers with sum n.

Original entry on oeis.org

1, 1, 2, 3, 4, 4, 7, 5, 7, 9, 9, 7, 14, 8, 11, 16, 13, 10, 20, 11, 17, 21, 16, 13, 27, 17, 18, 26, 22, 16, 35, 17, 23, 31, 23, 25, 41, 20, 25, 36, 33, 22, 46, 23, 31, 48, 30, 25, 52, 29, 38, 47, 36, 28, 57, 37, 41, 52, 37, 31, 71, 32, 39, 62, 44, 43, 69, 35, 45, 62, 57, 37, 79, 38
Offset: 0

Views

Author

Keywords

Comments

From Gus Wiseman, May 03 2019: (Start)
a(n) is the number of integer partitions of n with equal differences. The Heinz numbers of these partitions are given by A325328. For example, the a(1) = 1 through a(9) = 9 partitions are:
1 2 3 4 5 6 7 8 9
11 21 22 32 33 43 44 54
111 31 41 42 52 53 63
1111 11111 51 61 62 72
222 1111111 71 81
321 2222 333
111111 11111111 432
531
111111111
(End)
From Petros Hadjicostas, Sep 29 2019: (Start)
We show how Leroy Quet's g.f. Sum_{n >= 0} a(n)*x^n = 1/(1-x) + Sum_{k >= 2} x^k/(1-x^(k*(k-1)/2))/(1-x^k) in the Formula section below can be derived from Graeme McRae's g.f. for A049982 (see one of the links below).
Let b(n) = A049982(n) for n >= 1. Then Graeme McRae proved that Sum_{n >= 1} b(n)*x^n = Sum_{k >= 2} x^t(k)/(x^t(k) - x^t(k-1) - x^k + 1) = Sum_{k >= 2} x^t(k)/((1 - x^k) * (1 - x^t(k-1))), where t(k) = A000217(k) = k*(k+1)/2.
Since a(n) - b(n) = A000005(n) for n >= 1, to finish the proof, we only need to show that K(x) := 1 + Sum_{n >= 1} a(n)*x^n - Sum_{n >= 1} b(n)*x^n is the g.f. of A000005 (= number of divisors). But it is easy to show that K(x) = 1 + Sum_{k >= 1} x^k/(1 - x^k) = 1 + Sum_{n >= 1} A000005(n)*x^n (Lambert series for the number of divisors function). (End)

Crossrefs

Programs

  • Mathematica
    a[n_]:=If[n==0,1,Block[{i,c=Floor[(n-1)/2]+DivisorSigma[0,n]},Do[i=1;While[i*kGus Wiseman, May 07 2019 *)
    Table[Length[Select[IntegerPartitions[n],SameQ@@Differences[#]&]],{n,0,30}] (* Gus Wiseman, May 03 2019 *)
  • PARI
    seq(n)={Vec(1/(1-x) + sum(k=2, n, x^k/(1 - x^(k*(k-1)/2))/(1-x^k) + O(x*x^n)))} \\ Andrew Howroyd, Sep 28 2019

Formula

G.f.: 1/(1-x) + Sum_{k>=2} x^k/(1-x^(k*(k-1)/2))/(1-x^k). - Leroy Quet, Apr 08 2010. [Edited by Gus Wiseman, May 03 2019]
a(n) = A049982(n) + A000005(n) = A049980(n) + A000005(n) - 1 for n >= 1. - Petros Hadjicostas, Sep 28 2019

Extensions

Edited by Max Alekseyev, May 03 2010
a(0) = 1 prepended by Gus Wiseman, May 03 2019

A240026 Number of partitions of n such that the successive differences of consecutive parts are nondecreasing.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 10, 12, 16, 21, 27, 32, 43, 50, 60, 75, 90, 103, 128, 146, 170, 203, 234, 264, 315, 355, 402, 467, 530, 589, 684, 764, 851, 969, 1083, 1195, 1360, 1504, 1659, 1863, 2063, 2258, 2531, 2779, 3039, 3379, 3709, 4032, 4474, 4880, 5304, 5846, 6373, 6891, 7578, 8227, 8894, 9727, 10550, 11357, 12405, 13404, 14419
Offset: 0

Views

Author

Joerg Arndt, Mar 31 2014

Keywords

Comments

Partitions (p(1), p(2), ..., p(m)) such that p(k-1) - p(k-2) <= p(k) - p(k-1) for all k >= 3.
The differences of a sequence are defined as if the sequence were increasing, so for example the differences of (6,3,1) are (-3,-2). Then a(n) is the number of integer partitions of n whose differences are weakly increasing. The Heinz numbers of these partitions are given by A325360. Of course, the number of such integer partitions of n is also the number of reversed integer partitions of n whose differences are weakly increasing, which is the author's interpretation. - Gus Wiseman, May 03 2019

Examples

			There are a(10) = 27 such partitions of 10:
01:  [ 1 1 1 1 1 1 1 1 1 1 ]
02:  [ 1 1 1 1 1 1 1 1 2 ]
03:  [ 1 1 1 1 1 1 1 3 ]
04:  [ 1 1 1 1 1 1 4 ]
05:  [ 1 1 1 1 1 2 3 ]
06:  [ 1 1 1 1 1 5 ]
07:  [ 1 1 1 1 2 4 ]
08:  [ 1 1 1 1 6 ]
09:  [ 1 1 1 2 5 ]
10:  [ 1 1 1 7 ]
11:  [ 1 1 2 6 ]
12:  [ 1 1 3 5 ]
13:  [ 1 1 8 ]
14:  [ 1 2 3 4 ]
15:  [ 1 2 7 ]
16:  [ 1 3 6 ]
17:  [ 1 9 ]
18:  [ 2 2 2 2 2 ]
19:  [ 2 2 2 4 ]
20:  [ 2 2 6 ]
21:  [ 2 3 5 ]
22:  [ 2 8 ]
23:  [ 3 3 4 ]
24:  [ 3 7 ]
25:  [ 4 6 ]
26:  [ 5 5 ]
27:  [ 10 ]
		

Crossrefs

Cf. A240027 (strictly increasing differences).
Cf. A179255 (distinct parts, nondecreasing), A179254 (distinct parts, strictly increasing).

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],OrderedQ[Differences[#]]&]],{n,0,30}] (* Gus Wiseman, May 03 2019 *)
  • Ruby
    def partition(n, min, max)
      return [[]] if n == 0
      [max, n].min.downto(min).flat_map{|i| partition(n - i, min, i).map{|rest| [i, *rest]}}
    end
    def f(n)
      return 1 if n == 0
      cnt = 0
      partition(n, 1, n).each{|ary|
        ary0 = (1..ary.size - 1).map{|i| ary[i - 1] - ary[i]}
        cnt += 1 if ary0.sort == ary0.reverse
      }
      cnt
    end
    def A240026(n)
      (0..n).map{|i| f(i)}
    end
    p A240026(50) # Seiichi Manyama, Oct 13 2018

A320466 Number of partitions of n such that the successive differences of consecutive parts are nonincreasing.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 7, 7, 9, 12, 12, 13, 18, 17, 21, 25, 24, 27, 34, 33, 38, 44, 43, 47, 58, 56, 62, 70, 70, 78, 90, 84, 96, 109, 108, 118, 132, 127, 140, 158, 158, 167, 189, 185, 204, 221, 218, 236, 260, 261, 282, 301, 299, 322, 358, 350, 376, 405, 404, 432, 472, 466, 500
Offset: 0

Views

Author

Seiichi Manyama, Oct 13 2018

Keywords

Comments

Partitions are usually written with parts in descending order, but the conditions are easier to check "visually" if written in ascending order.
Partitions (p(1), p(2), ..., p(m)) such that p(k-1) - p(k-2) >= p(k) - p(k-1) for all k >= 3.
The differences of a sequence are defined as if the sequence were increasing, so for example the differences of (6,3,1) are (-3,-2). Then a(n) is the number of integer partitions of n whose differences are weakly decreasing. The Heinz numbers of these partitions are given by A325361. Of course, the number of such integer partitions of n is also the number of reversed integer partitions of n whose differences are weakly decreasing, which is the author's interpretation. - Gus Wiseman, May 03 2019

Examples

			There are a(10) = 12 such partitions of 10:
01: [10]
02: [1, 9]
03: [2, 8]
04: [3, 7]
05: [4, 6]
06: [5, 5]
07: [1, 4, 5]
08: [2, 4, 4]
09: [1, 2, 3, 4]
10: [1, 3, 3, 3]
11: [2, 2, 2, 2, 2]
12: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
There are a(11) = 13 such partitions of 11:
01: [11]
02: [1, 10]
03: [2, 9]
04: [3, 8]
05: [4, 7]
06: [5, 6]
07: [1, 4, 6]
08: [1, 5, 5]
09: [2, 4, 5]
10: [3, 4, 4]
11: [2, 3, 3, 3]
12: [1, 2, 2, 2, 2, 2]
13: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
		

Crossrefs

Cf. A320382 (distinct parts, nonincreasing).

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],GreaterEqual@@Differences[#]&]],{n,0,30}] (* Gus Wiseman, May 03 2019 *)
  • Ruby
    def partition(n, min, max)
      return [[]] if n == 0
      [max, n].min.downto(min).flat_map{|i| partition(n - i, min, i).map{|rest| [i, *rest]}}
    end
    def f(n)
      return 1 if n == 0
      cnt = 0
      partition(n, 1, n).each{|ary|
        ary0 = (1..ary.size - 1).map{|i| ary[i - 1] - ary[i]}
        cnt += 1 if ary0.sort == ary0
      }
      cnt
    end
    def A320466(n)
      (0..n).map{|i| f(i)}
    end
    p A320466(50)

A014405 Number of arithmetic progressions of 3 or more positive integers, strictly increasing with sum n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 2, 1, 0, 3, 0, 1, 5, 1, 0, 6, 0, 2, 7, 2, 0, 8, 2, 2, 9, 3, 0, 13, 0, 2, 11, 3, 4, 15, 0, 3, 13, 6, 0, 18, 0, 4, 20, 4, 0, 19, 2, 8, 18, 5, 0, 23, 6, 6, 20, 5, 0, 30, 0, 5, 25, 6, 7, 29, 0, 6, 24, 15, 0, 32, 0, 6, 34, 7, 4, 34, 0, 14, 31, 7, 0, 39, 9, 7, 31, 9, 0, 49, 5, 9, 33, 8, 10, 42, 0, 12
Offset: 1

Views

Author

Keywords

Examples

			E.g., 15 = 1+2+3+4+5 = 1+5+9 = 2+5+8 = 3+5+7 = 4+5+6.
		

Crossrefs

Programs

  • PARI
    a(n)= t=0; st=0; forstep(s=(n-3)\3,1,-1, st++; for(c=1,st, m=3; w=m*(s+c); while(wRick L. Shepherd, Aug 30 2006

Formula

G.f.: Sum_{k >= 3} x^t(k)/(x^t(k) - x^t(k-1) - x^k + 1) = Sum_{k >= 3} x^t(k)/((1 - x^k) * (1 - x^t(k-1))), where t(k) = k*(k+1)/2 = A000217(k) is the k-th triangular number [Graeme McRae]. - Petros Hadjicostas, Sep 29 2019
a(n) = A049992(n) - A023645(n). - Antti Karttunen, Feb 20 2023

A014406 Number of strictly increasing arithmetic progressions of positive integers with at least 3 terms and sum <= n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 1, 3, 4, 4, 7, 7, 8, 13, 14, 14, 20, 20, 22, 29, 31, 31, 39, 41, 43, 52, 55, 55, 68, 68, 70, 81, 84, 88, 103, 103, 106, 119, 125, 125, 143, 143, 147, 167, 171, 171, 190, 192, 200, 218, 223, 223, 246, 252, 258, 278, 283, 283, 313, 313, 318, 343, 349, 356, 385, 385
Offset: 1

Views

Author

Keywords

Examples

			From _Petros Hadjicostas_, Sep 29 2019: (Start)
a(8) = 1 because we have only the following strictly increasing arithmetic progression of positive integers with at least 3 terms and sum <= 8: 1+2+3.
a(9) = 3 because we have the following strictly increasing arithmetic progressions of positive integers with at least 3 terms and sum <= 9: 1+2+3, 1+3+5, and 2+3+4.
a(10) = 4 because we have the following strictly increasing arithmetic progressions of positive integers with at least 3 terms and sum <= 10: 1+2+3, 1+3+5, 2+3+4, and 1+2+3+4.
(End)
		

Crossrefs

Formula

a(n) = Sum_{k=1..n} A014405(k). - Sean A. Irvine, Oct 22 2018
G.f.: (g.f. of A014405)/(1-x). - Petros Hadjicostas, Sep 29 2019

Extensions

a(59)-a(67) corrected by Fausto A. C. Cariboni, Oct 02 2018

A179254 Number of partitions of n into distinct parts such that the successive differences of consecutive parts are strictly increasing.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 3, 5, 5, 6, 8, 9, 9, 13, 14, 15, 19, 21, 22, 28, 30, 32, 39, 42, 44, 54, 58, 61, 72, 77, 82, 96, 102, 108, 124, 133, 141, 160, 171, 180, 203, 218, 230, 256, 273, 289, 320, 342, 361, 395, 423, 447, 486, 520, 548, 594, 635, 669, 721, 769, 811, 871, 928, 978, 1044, 1114
Offset: 0

Views

Author

Joerg Arndt, Jan 05 2011

Keywords

Comments

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.

Examples

			There are a(17) = 21 such partitions of 17:
01:  [ 1 2 4 10 ]
02:  [ 1 2 5 9 ]
03:  [ 1 2 14 ]
04:  [ 1 3 13 ]
05:  [ 1 4 12 ]
06:  [ 1 5 11 ]
07:  [ 1 16 ]
08:  [ 2 3 12 ]
09:  [ 2 4 11 ]
10:  [ 2 5 10 ]
11:  [ 2 15 ]
12:  [ 3 4 10 ]
13:  [ 3 5 9 ]
14:  [ 3 14 ]
15:  [ 4 5 8 ]
16:  [ 4 13 ]
17:  [ 5 12 ]
18:  [ 6 11 ]
19:  [ 7 10 ]
20:  [ 8 9 ]
21:  [ 17 ]
- _Joerg Arndt_, Mar 31 2014
		

Crossrefs

Cf. A007294, A179255 (nondecreasing differences), A179269, A320382, A320385.
Cf. A240026 (partitions with nondecreasing differences), A240027 (partitions with strictly increasing differences).

Programs

  • Ruby
    def partition(n, min, max)
      return [[]] if n == 0
      [max, n].min.downto(min).flat_map{|i| partition(n - i, min, i - 1).map{|rest| [i, *rest]}}
    end
    def f(n)
      return 1 if n == 0
      cnt = 0
      partition(n, 1, n).each{|ary|
        ary0 = (1..ary.size - 1).map{|i| ary[i - 1] - ary[i]}
        cnt += 1 if ary0.sort == ary0.reverse && ary0.uniq == ary0
      }
      cnt
    end
    def A179254(n)
      (0..n).map{|i| f(i)}
    end
    p A179254(50) # Seiichi Manyama, Oct 12 2018
  • Sage
    def A179254(n):
        has_increasing_diffs = lambda x: min(differences(x,2)) >= 1
        allowed = lambda x: len(x) < 3 or has_increasing_diffs(x)
        return len([x for x in Partitions(n,max_slope=-1) if allowed(x[::-1])])
    # D. S. McNeil, Jan 06 2011
    

A320509 Number of partitions of n such that the successive differences of consecutive parts are nonincreasing, and first difference <= first part.

Original entry on oeis.org

1, 1, 2, 3, 3, 4, 6, 4, 6, 8, 7, 8, 11, 7, 12, 14, 10, 13, 19, 12, 18, 21, 16, 19, 27, 19, 25, 30, 25, 30, 37, 25, 35, 40, 35, 42, 49, 35, 49, 56, 46, 54, 66, 50, 65, 72, 60, 70, 83, 68, 84, 90, 80, 94, 110, 86, 107, 116, 98, 119, 137, 111, 134, 146, 130, 148, 165, 141, 169
Offset: 0

Views

Author

Seiichi Manyama, Oct 14 2018

Keywords

Comments

Partitions are usually written with parts in descending order, but the conditions are easier to check visually if written in ascending order.
The differences of a sequence are defined as if the sequence were increasing, so for example the differences (with the first part taken to be 0) of (6,3,1) 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 weakly decreasing. The Heinz numbers of these partitions are given by A325364. Of course, the number of such integer partitions of n is also the number of reversed integer partitions of n whose differences (with the first part taken to be 0) are weakly decreasing, which is the author's interpretation. - Gus Wiseman, May 03 2019

Examples

			There are a(11) = 8 such partitions of 11:
01: [11]
02: [4, 7]
03: [5, 6]
04: [2, 4, 5]
05: [3, 4, 4]
06: [2, 3, 3, 3]
07: [1, 2, 2, 2, 2, 2]
08: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
There are a(12) = 11 such partitions of 12:
01: [12]
02: [4, 8]
03: [5, 7]
04: [6, 6]
05: [2, 4, 6]
06: [3, 4, 5]
07: [4, 4, 4]
08: [3, 3, 3, 3]
09: [1, 2, 3, 3, 3]
10: [2, 2, 2, 2, 2, 2]
11: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
		

Crossrefs

Cf. A320387 (distinct parts, nonincreasing, and first difference <= first part).

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],GreaterEqual@@Differences[Append[#,0]]&]],{n,0,30}] (* Gus Wiseman, May 03 2019 *)
  • Ruby
    def partition(n, min, max)
      return [[]] if n == 0
      [max, n].min.downto(min).flat_map{|i| partition(n - i, min, i).map{|rest| [i, *rest]}}
    end
    def f(n)
      return 1 if n == 0
      cnt = 0
      partition(n, 1, n).each{|ary|
        ary << 0
        ary0 = (1..ary.size - 1).map{|i| ary[i - 1] - ary[i]}
        cnt += 1 if ary0.sort == ary0
      }
      cnt
    end
    def A320509(n)
      (0..n).map{|i| f(i)}
    end
    p A320509(50)

A049989 a(n) is the number of arithmetic progressions of positive integers, nondecreasing with sum <= n.

Original entry on oeis.org

1, 3, 6, 10, 14, 21, 26, 33, 42, 51, 58, 72, 80, 91, 107, 120, 130, 150, 161, 178, 199, 215, 228, 255, 272, 290, 316, 338, 354, 389, 406, 429, 460, 483, 508, 549, 569, 594, 630, 663, 685, 731, 754, 785, 833, 863, 888, 940, 969, 1007, 1054, 1090, 1118, 1175, 1212, 1253, 1305, 1342, 1373, 1444, 1476, 1515, 1577, 1621
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • PARI
    seq(n)={my(w=(sqrtint(8*n+1)-1)\2+1); Vec(x/(1-x)^2 + sum(k=2, n, x^k/(1 - if(k<=w, x^(k*(k-1)/2)))/(1-x^k) + O(x*x^n))/(1-x))} \\ Andrew Howroyd, Sep 28 2019

Formula

From Petros Hadjicostas, Sep 29 2019: (Start)
a(n) = Sum_{k = 1..n} A049988(k). [Note that the offset of A049988 is 0.]
G.f.: (-1 + g.f. of A049988)/(1-x). (End)

Extensions

More terms from Petros Hadjicostas, Sep 28 2019

A179269 Number of partitions of n into distinct parts such that the successive differences of consecutive parts are increasing, and first difference > first part.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 5, 5, 5, 7, 7, 7, 10, 10, 10, 13, 14, 14, 18, 19, 19, 23, 25, 25, 30, 32, 33, 38, 41, 42, 48, 52, 54, 60, 65, 67, 75, 81, 84, 92, 99, 103, 113, 121, 126, 136, 147, 153, 165, 177, 184, 197, 213, 221, 236, 253, 264, 280, 301, 313, 331, 355, 371, 390, 418, 435, 458
Offset: 0

Views

Author

Joerg Arndt, Jan 05 2011

Keywords

Comments

Conditions as in A179254; additionally, if more than 1 part, first difference > first part.
Equivalently, number of partitions for which the sequence of part counts by decreasing part size is 1, 2, 3, ... - Olivier Gérard, Jul 28 2017

Examples

			a(10) = 5 as there are 5 such partitions of 10: 1 + 3 + 6 = 1 + 9 = 2 + 8 = 3 + 7 = 10.
a(10) = 5 as there are 5 such partitions of 10: 10, 8 + 1 + 1, 6 + 2 + 2, 4 + 3 + 3, 3 + 2 + 2 + 1 + 1 + 1 (second definition).
From _Gus Wiseman_, May 04 2019: (Start)
The a(3) = 1 through a(13) = 7 partitions whose differences are strictly increasing (with the last part taken to be 0) are the following (A = 10, B = 11, C = 12, D = 13). The Heinz numbers of these partitions are given by A325460.
  (3)  (4)   (5)   (6)   (7)   (8)   (9)   (A)    (B)    (C)    (D)
       (31)  (41)  (51)  (52)  (62)  (72)  (73)   (83)   (93)   (94)
                         (61)  (71)  (81)  (82)   (92)   (A2)   (A3)
                                           (91)   (A1)   (B1)   (B2)
                                           (631)  (731)  (831)  (C1)
                                                                (841)
                                                                (931)
The a(3) = 1 through a(11) = 5 partitions whose multiplicities form an initial interval of positive integers are the following (A = 10, B = 11). The Heinz numbers of these partitions are given by A307895.
  (3)  (4)    (5)    (6)    (7)    (8)    (9)    (A)       (B)
       (211)  (311)  (411)  (322)  (422)  (522)  (433)     (533)
                            (511)  (611)  (711)  (622)     (722)
                                                 (811)     (911)
                                                 (322111)  (422111)
(End)
		

Crossrefs

Cf. A179254 (condition only on differences), A007294 (nondecreasing instead of strictly increasing), A179255, A320382, A320385, A320387, A320388.

Programs

  • Mathematica
    Table[Length@
      Select[IntegerPartitions[n],
       And @@ Equal[Range[Length[Split[#]]], Length /@ Split[#]] &], {n,
    0, 40}]   (* Olivier Gérard, Jul 28 2017 *)
    Table[Length[Select[IntegerPartitions[n],Less@@Differences[Append[#,0]]&]],{n,0,30}] (* Gus Wiseman, May 04 2019 *)
  • PARI
    R(n)={my(L=List(), v=vectorv(n, i, 1), w=1, t=1); while(v, listput(L,v); w++; t+=w; v=vectorv(n, i, sum(k=1, (i-1)\t, L[w-1][i-k*t]))); Mat(L)}
    seq(n)={my(M=R(n)); concat([1], vector(n, i, vecsum(M[i,])))} \\ Andrew Howroyd, Aug 27 2019
  • Ruby
    def partition(n, min, max)
      return [[]] if n == 0
      [max, n].min.downto(min).flat_map{|i| partition(n - i, min, i - 1).map{|rest| [i, *rest]}}
    end
    def f(n)
      return 1 if n == 0
      cnt = 0
      partition(n, 1, n).each{|ary|
        ary << 0
        ary0 = (1..ary.size - 1).map{|i| ary[i - 1] - ary[i]}
        cnt += 1 if ary0.sort == ary0.reverse && ary0.uniq == ary0
      }
      cnt
    end
    def A179269(n)
      (0..n).map{|i| f(i)}
    end
    p A179269(50) # Seiichi Manyama, Oct 12 2018
    
  • Sage
    def A179269(n):
        has_increasing_diffs = lambda x: min(differences(x,2)) >= 1
        special = lambda x: (x[1]-x[0]) > x[0]
        allowed = lambda x: (len(x) < 2 or special(x)) and (len(x) < 3 or has_increasing_diffs(x))
        return len([x for x in Partitions(n,max_slope=-1) if allowed(x[::-1])])
    # D. S. McNeil, Jan 06 2011
    

Formula

G.f.: Sum_{k>=0} x^(k*(k+1)*(k+2)/6) / Product_{j=1..k} (1 - x^(j*(j+1)/2)) (conjecture). - Ilya Gutkovskiy, Apr 25 2019
Showing 1-10 of 20 results. Next