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 16 results. Next

A350842 Number of integer partitions of n with no difference -2.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 9, 12, 16, 24, 30, 40, 54, 69, 89, 118, 146, 187, 239, 297, 372, 468, 575, 711, 880, 1075, 1314, 1610, 1947, 2359, 2864, 3438, 4135, 4973, 5936, 7090, 8466, 10044, 11922, 14144, 16698, 19704, 23249, 27306, 32071, 37639, 44019, 51457, 60113
Offset: 0

Views

Author

Gus Wiseman, Jan 20 2022

Keywords

Examples

			The a(1) = 1 through a(7) = 12 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)
       (11)  (21)   (22)    (32)     (33)      (43)
             (111)  (211)   (41)     (51)      (52)
                    (1111)  (221)    (222)     (61)
                            (2111)   (321)     (322)
                            (11111)  (411)     (511)
                                     (2211)    (2221)
                                     (21111)   (3211)
                                     (111111)  (4111)
                                               (22111)
                                               (211111)
                                               (1111111)
		

Crossrefs

Heinz number rankings are in parentheses below.
The version for no difference 0 is A000009.
The version for subsets of prescribed maximum is A005314.
The version for all differences < -2 is A025157, non-strict A116932.
The version for all differences > -2 is A034296, strict A001227.
The opposite version is A072670.
The version for no difference -1 is A116931 (A319630), strict A003114.
The multiplicative version is A350837 (A350838), strict A350840.
The strict case is A350844.
The complement for quotients is counted by A350846 (A350845).
A000041 = integer partitions.
A027187 = partitions of even length.
A027193 = partitions of odd length (A026424).
A323092 = double-free partitions (A320340), strict A120641.
A325534 = separable partitions (A335433).
A325535 = inseparable partitions (A335448).
A350839 = partitions with a gap and conjugate gap (A350841).

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],FreeQ[Differences[#],-2]&]],{n,0,30}]

A177510 Number of compositions (p0, p1, p2, ...) of n with pi - p0 <= i and pi >= p0.

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 14, 25, 46, 87, 167, 324, 634, 1248, 2466, 4887, 9706, 19308, 38455, 76659, 152925, 305232, 609488, 1217429, 2432399, 4860881, 9715511, 19421029, 38826059, 77626471, 155211785, 310357462, 620608652, 1241046343, 2481817484, 4963191718, 9925669171, 19850186856, 39698516655, 79394037319
Offset: 0

Views

Author

Mats Granvik, Dec 11 2010

Keywords

Comments

a(0)=1, otherwise row sums of A179748.
For n>=1 cumulative sums of A008930.
a(n) is proportional to A048651*A000079. The error (a(n)-A048651*A000079) divided by sequence A186425 tends to the golden ratio A001622. This can be seen when using about 1000 decimals of the constant A048651 = 0.2887880950866024212... - [Mats Granvik, Jan 01 2015]
From Gus Wiseman, Mar 31 2022: (Start)
Also the number of integer compositions of n with exactly one part on or above the diagonal. For example, the a(1) = 1 through a(5) = 8 compositions are:
(1) (2) (3) (4) (5)
(11) (21) (31) (41)
(111) (112) (212)
(211) (311)
(1111) (1112)
(1121)
(2111)
(11111)
(End)

Examples

			From _Joerg Arndt_, Mar 24 2014: (Start)
The a(7) = 25 such compositions are:
01:  [ 1 1 1 1 1 1 1 ]
02:  [ 1 1 1 1 1 2 ]
03:  [ 1 1 1 1 2 1 ]
04:  [ 1 1 1 1 3 ]
05:  [ 1 1 1 2 1 1 ]
06:  [ 1 1 1 2 2 ]
07:  [ 1 1 1 3 1 ]
08:  [ 1 1 1 4 ]
09:  [ 1 1 2 1 1 1 ]
10:  [ 1 1 2 1 2 ]
11:  [ 1 1 2 2 1 ]
12:  [ 1 1 2 3 ]
13:  [ 1 1 3 1 1 ]
14:  [ 1 1 3 2 ]
15:  [ 1 2 1 1 1 1 ]
16:  [ 1 2 1 1 2 ]
17:  [ 1 2 1 2 1 ]
18:  [ 1 2 1 3 ]
19:  [ 1 2 2 1 1 ]
20:  [ 1 2 2 2 ]
21:  [ 1 2 3 1 ]
22:  [ 2 2 3 ]
23:  [ 2 3 2 ]
24:  [ 3 4 ]
25:  [ 7 ]
(End)
		

Crossrefs

Cf. A238859 (compositions with subdiagonal growth), A238876 (partitions with subdiagonal growth), A001227 (partitions into distinct parts with subdiagonal growth).
Cf. A238860 (partitions with superdiagonal growth), A238861 (compositions with superdiagonal growth), A000009 (partitions into distinct parts have superdiagonal growth by definition).
The version for partitions is A001477, strong A002620.
The version for permutations is A057427, strong A000295.
The opposite version is A238874, first column of A352522.
The version for fixed points is A240736, nonfixed A352520.
The strong version is A351983, column k=1 of A352524.
This is column k = 1 of A352525.
A238349 counts compositions by fixed points, first col A238351.
A352517 counts weak excedances of standard compositions.

Programs

  • Maple
    A179748 := proc(n,k) option remember; if k= 1 then 1; elif k> n then 0 ; else add( procname(n-i,k-1),i=1..k-1) ; end if; end proc:
    A177510 := proc(n) add(A179748(n,k),k=1..n) ;end proc:
    seq(A177510(n),n=1..20) ; # R. J. Mathar, Dec 14 2010
  • Mathematica
    Clear[t, nn]; nn = 39; t[n_, 1] = 1; t[n_, k_] := t[n, k] = If[n >= k, Sum[t[n - i, k - 1], {i, 1, k - 1}], 0]; Table[Sum[t[n, k], {k, 1, n}], {n, 1, nn}] (* Mats Granvik, Jan 01 2015 *)
    pdw[y_]:=Length[Select[Range[Length[y]],#<=y[[#]]&]]; Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],pdw[#]==1&]],{n,0,10}] (* Gus Wiseman, Mar 31 2022 *)
  • PARI
    N=66; q='q+O('q^N); Vec( 1 + q/(1-q) * sum(n=0, N, q^n * prod(k=1, n, (1-q^k)/(1-q) ) ) ) \\ Joerg Arndt, Mar 24 2014
  • Sage
    @CachedFunction
    def T(n, k): # A179748
        if n == 0:  return int(k==0);
        if k == 1:  return int(n>=1);
        return sum( T(n-i, k-1) for i in [1..k-1] );
    # to display triangle A179748 including column zero = [1,0,0,0,...]:
    #for n in [0..10]: print([ T(n,k) for k in [0..n] ])
    def a(n): return sum( T(n,k) for k in [0..n] )
    print([a(n) for n in [0..66]])
    # Joerg Arndt, Mar 24 2014
    

Formula

G.f.: 1 + q/(1-q) * sum(n>=0, q^n * prod(k=1..n, (1-q^k)/(1-q) ) ). [Joerg Arndt, Mar 24 2014]

Extensions

New name and a(0) = 1 prepended, Joerg Arndt, Mar 24 2014

A352525 Irregular triangle read by rows where T(n,k) is the number of integer compositions of n with k weak excedances (parts on or above the diagonal), all zeros removed.

Original entry on oeis.org

1, 1, 2, 3, 1, 5, 3, 8, 8, 14, 17, 1, 25, 35, 4, 46, 70, 12, 87, 137, 32, 167, 268, 76, 1, 324, 525, 170, 5, 634, 1030, 367, 17, 1248, 2026, 773, 49, 2466, 3999, 1598, 129, 4887, 7914, 3267, 315, 1, 9706, 15695, 6631, 730, 6, 19308, 31181, 13393, 1631, 23
Offset: 0

Views

Author

Gus Wiseman, Mar 22 2022

Keywords

Examples

			Triangle begins:
     1
     1
     2
     3     1
     5     3
     8     8
    14    17     1
    25    35     4
    46    70    12
    87   137    32
   167   268    76     1
   324   525   170     5
For example, row n = 6 counts the following compositions:
  (6)       (15)     (123)
  (51)      (24)
  (312)     (33)
  (411)     (42)
  (1113)    (114)
  (1122)    (132)
  (2112)    (141)
  (2121)    (213)
  (3111)    (222)
  (11112)   (231)
  (11121)   (321)
  (11211)   (1131)
  (21111)   (1212)
  (111111)  (1221)
            (1311)
            (2211)
            (12111)
		

Crossrefs

Row sums are A011782.
The version for partitions is A115994.
The version for permutations is A123125, strong A173018.
Column k = 1 is A177510.
The corresponding rank statistic is A352517.
The strong opposite is A352521, first col A219282, rank statistic A352514.
The opposite version is A352522, first col A238874, rank statistic A352515.
The strong version is A352524, first column A008930, rank statistic A352516.
A008292 is the triangle of Eulerian numbers (version without zeros).
A238349 counts comps by fixed points, first col A238351, rank stat A352512.
A352489 lists the weak excedance set of A122111.
A352523 counts comps by unfixed points, first A352520, rank stat A352513.

Programs

  • Mathematica
    pdw[y_]:=Length[Select[Range[Length[y]],#<=y[[#]]&]];
    DeleteCases[Table[Length[Select[Join@@ Permutations/@IntegerPartitions[n],pdw[#]==k&]],{n,0,10},{k,0,n}],0,{2}]
  • PARI
    T(n)={my(v=vector(n+1, i, i==1), r=v); for(k=1, n, v=vector(#v, j, sum(i=1, j-1, if(k<=i,x,1)*v[j-i])); r+=v); r[1]=x; [Vecrev(p) | p<-r/x]}
    { my(A=T(10)); for(i=1, #A, print(A[i])) } \\ Andrew Howroyd, Jan 19 2023

A239955 Number of partitions p of n such that (number of distinct parts of p) <= max(p) - min(p).

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 4, 7, 12, 17, 27, 38, 54, 75, 104, 137, 187, 245, 322, 418, 542, 691, 887, 1121, 1417, 1777, 2228, 2767, 3441, 4247, 5235, 6424, 7871, 9594, 11688, 14173, 17168, 20723, 24979, 30008, 36010, 43085, 51479, 61357, 73032, 86718, 102852, 121718
Offset: 0

Views

Author

Clark Kimberling, Mar 30 2014

Keywords

Comments

From Gus Wiseman, Jun 26 2022: (Start)
Also the number of partitions of n with at least one gap, i.e., partitions whose parts do not form a contiguous interval. These partitions are ranked by A073492. For example, the a(0) = 0 through a(8) = 12 partitions are:
. . . . (31) (41) (42) (52) (53)
(311) (51) (61) (62)
(411) (331) (71)
(3111) (421) (422)
(511) (431)
(4111) (521)
(31111) (611)
(3311)
(4211)
(5111)
(41111)
(311111)
Also the number of non-constant partitions of n with a repeated non-maximal part, ranked by A065201. The a(0) = 0 through a(8) = 12 partitions are:
. . . . (211) (311) (411) (322) (422)
(2111) (2211) (511) (611)
(3111) (3211) (3221)
(21111) (4111) (3311)
(22111) (4211)
(31111) (5111)
(211111) (22211)
(32111)
(41111)
(221111)
(311111)
(2111111)
(End)

Examples

			a(6) counts these 4 partitions:  51, 42, 411, 3111.
		

Crossrefs

The complement is counted by A034296 (strict A137793), ranked by A073491.
These partitions are ranked by A073492, conjugate A065201.
Applying the condition to the conjugate gives A350839, ranked by A350841.
A000041 counts integer partitions, strict A000009.
A090858 counts partitions with a single hole, ranked by A325284.
A116931 counts partitions with differences != -1, strict A003114.
A116932 counts partitions with differences != -1 or -2, strict A025157.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1,
          `if`(i<1, 0, add(b(n-i*j, i-1), j=1..n/i)))
        end:
    a:= n-> combinat[numbpart](n)-add(b(n, k), k=0..n):
    seq(a(n), n=0..47);  # Alois P. Heinz, Aug 18 2025
  • Mathematica
    z = 60; d[p_] := d[p] = Length[DeleteDuplicates[p]]; f[p_] := f[p] = Max[p] - Min[p]; g[n_] := g[n] = IntegerPartitions[n];
    Table[Count[g[n], p_ /; d[p] < f[p]], {n, 0, z}]  (*A239954*)
    Table[Count[g[n], p_ /; d[p] <= f[p]], {n, 0, z}] (*A239955*)
    Table[Count[g[n], p_ /; d[p] == f[p]], {n, 0, z}] (*A239956*)
    Table[Count[g[n], p_ /; d[p] > f[p]], {n, 0, z}]  (*A034296*)
    Table[Count[g[n], p_ /; d[p] >= f[p]], {n, 0, z}] (*A239958*)
    (* second program *)
    Table[Length[Select[IntegerPartitions[n],Min@@Differences[#]<-1&]],{n,0,30}] (* Gus Wiseman, Jun 26 2022 *)
  • PARI
    qs(a,q,n) = {prod(k=0,n,1-a*q^k)}
    A_q(N) = {if(N<4, vector(N+1,i,0), my(q='q+O('q^(N-2)), g= sum(i=2,N+1, q^i/qs(q,q,i-1)*sum(j=1,i-1, q^(2*j)*qs(q^2,q^2,j-2)))); concat([0,0,0,0], Vec(g)))} \\ John Tyler Rascoe, Aug 16 2025

Formula

a(n) = A000041(n) - A034296(n).
G.f.: Sum_{i>1} q^i/(q;q){i-1} * Sum{j=1..i-1} (q^2;q^2){j-2} where (a;q)_k = Product{i>=0..k} (1-a*q^i). - John Tyler Rascoe, Aug 16 2025

A352521 Triangle read by rows where T(n,k) is the number of integer compositions of n with k strong nonexcedances (parts below the diagonal).

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 2, 1, 1, 0, 3, 2, 2, 1, 0, 4, 5, 3, 3, 1, 0, 6, 8, 7, 6, 4, 1, 0, 9, 12, 15, 12, 10, 5, 1, 0, 13, 19, 27, 25, 22, 15, 6, 1, 0, 18, 32, 43, 51, 46, 37, 21, 7, 1, 0, 25, 51, 70, 94, 94, 83, 58, 28, 8, 1, 0, 35, 77, 117, 162, 184, 176, 141, 86, 36, 9, 1, 0
Offset: 0

Views

Author

Gus Wiseman, Mar 22 2022

Keywords

Examples

			Triangle begins:
   1
   1   0
   1   1   0
   2   1   1   0
   3   2   2   1   0
   4   5   3   3   1   0
   6   8   7   6   4   1   0
   9  12  15  12  10   5   1   0
  13  19  27  25  22  15   6   1   0
  18  32  43  51  46  37  21   7   1   0
  25  51  70  94  94  83  58  28   8   1   0
For example, row n = 6 counts the following compositions (empty column indicated by dot):
  (6)    (51)   (312)   (1113)   (11112)  (111111)  .
  (15)   (114)  (411)   (1122)   (11121)
  (24)   (132)  (1131)  (2112)   (11211)
  (33)   (141)  (1212)  (2121)   (21111)
  (42)   (213)  (1221)  (3111)
  (123)  (222)  (1311)  (12111)
         (231)  (2211)
         (321)
		

Crossrefs

Row sums are A011782.
The version for partitions is A114088.
Row sums without the last term are A131577.
The version for permutations is A173018.
Column k = 0 is A219282.
The corresponding rank statistic is A352514.
The weak version is A352522, first column A238874, rank statistic A352515.
The opposite version is A352524, first column A008930, rank stat A352516.
The weak opposite version is A352525, first col A177510, rank stat A352517.
A008292 is the triangle of Eulerian numbers (version without zeros).
A238349 counts comps by fixed points, first col A238351, rank stat A352512.
A352490 is the strong nonexcedance set of A122111.
A352523 counts comps by nonfixed points, first A352520, rank stat A352513.

Programs

  • Mathematica
    pa[y_]:=Length[Select[Range[Length[y]],#>y[[#]]&]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],pa[#]==k&]],{n,0,15},{k,0,n}]
  • PARI
    T(n)={my(v=vector(n+1, i, i==1), r=v); for(k=1, n, v=vector(#v, j, sum(i=1, j-1, if(k>i,x,1)*v[j-i])); r+=v); vector(#v, i, Vecrev(r[i], i))}
    { my(A=T(10)); for(i=1, #A, print(A[i])) } \\ Andrew Howroyd, Jan 19 2023

Extensions

Terms a(66) and beyond from Andrew Howroyd, Jan 19 2023

A352524 Irregular triangle read by rows where T(n,k) is the number of integer compositions of n with k excedances (parts above the diagonal), all zeros removed.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 5, 6, 9, 1, 11, 18, 3, 21, 35, 8, 41, 67, 20, 80, 131, 44, 1, 157, 257, 94, 4, 310, 505, 197, 12, 614, 996, 406, 32, 1218, 1973, 825, 80, 2421, 3915, 1669, 186, 1, 4819, 7781, 3364, 415, 5, 9602, 15486, 6762, 901, 17, 19147, 30855, 13567, 1918, 49
Offset: 0

Views

Author

Gus Wiseman, Mar 22 2022

Keywords

Examples

			Triangle begins:
     1
     1
     1     1
     2     2
     3     5
     6     9     1
    11    18     3
    21    35     8
    41    67    20
    80   131    44     1
   157   257    94     4
   310   505   197    12
   614   996   406    32
For example, row n = 5 counts the following compositions:
  (113)    (5)     (23)
  (122)    (14)
  (1112)   (32)
  (1121)   (41)
  (1211)   (131)
  (11111)  (212)
           (221)
           (311)
           (2111)
		

Crossrefs

The version for permutations is A008292, weak A123125.
Column k = 0 is A008930.
Row sums are A011782.
The opposite version for partitions is A114088.
The weak version for partitions is A115994.
Column k = 1 is A351983.
The corresponding rank statistic is A352516.
The opposite version is A352521, first col A219282, rank statistic A352514.
The weak opposite version is A352522, first col A238874, rank stat A352515.
The weak version is A352525, first col (k = 1) A177510, rank stat A352517.
A238349 counts comps by fixed points, first col A238351, rank stat A352512.
A352487 lists the excedance set of A122111, opposite A352490.
A352523 counts comps by unfixed points, first A352520, rank stat A352513.

Programs

  • Mathematica
    pd[y_]:=Length[Select[Range[Length[y]],#
    				
  • PARI
    S(v,u)={vector(#v, k, sum(i=1, k-1, v[k-i]*u[i]))}
    T(n)={my(v=vector(1+n), s); v[1]=1; s=v; for(i=1, n, v=S(v, vector(n, j, if(j>i,'x,1))); s+=v); [Vecrev(p) | p<-s]}
    { my(A=T(12)); for(n=1, #A, print(A[n])) } \\ Andrew Howroyd, Jan 02 2023

A352833 Irregular triangle read by rows where T(n,k) is the number of integer partitions of n with k fixed points, k = 0, 1.

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 2, 1, 3, 2, 4, 3, 6, 5, 8, 7, 12, 10, 16, 14, 23, 19, 30, 26, 42, 35, 54, 47, 73, 62, 94, 82, 124, 107, 158, 139, 206, 179, 260, 230, 334, 293, 420, 372, 532, 470, 664, 591, 835, 740, 1034, 924, 1288, 1148, 1588, 1422, 1962, 1756, 2404, 2161
Offset: 0

Views

Author

Gus Wiseman, Apr 08 2022

Keywords

Comments

A fixed point of a sequence y is an index y(i) = i. A fixed point of a partition is unique if it exists, so all columns k > 1 are zeros.
Conjecture:
(1) This is A064428 interleaved with A001522.
(2) Reversing rows gives A300788, the strict version of A300787.

Examples

			Triangle begins:
  0: {1,0}
  1: {0,1}
  2: {1,1}
  3: {2,1}
  4: {3,2}
  5: {4,3}
  6: {6,5}
  7: {8,7}
  8: {12,10}
  9: {16,14}
For example, row n = 7 counts the following partitions:
  (7)       (52)
  (61)      (421)
  (511)     (322)
  (43)      (3211)
  (4111)    (2221)
  (331)     (22111)
  (31111)   (1111111)
  (211111)
		

Crossrefs

Row sums are A000041.
The version for permutations is A008290, for nonfixed points A098825.
The columns appear to be A064428 and A001522.
The version counting strong nonexcedances is A114088.
The version for compositions is A238349, rank statistic A352512.
The version for reversed partitions is A238352.
Reversing rows appears to give A300788, the strict case of A300787.
A000700 counts self-conjugate partitions, ranked by A088902.
A115720 and A115994 count partitions by their Durfee square.
A330644 counts non-self-conjugate partitions, ranked by A352486.

Programs

  • Mathematica
    pq[y_]:=Length[Select[Range[Length[y]],#==y[[#]]&]];
    Table[Length[Select[IntegerPartitions[n],pq[#]==k&]],{n,0,15},{k,0,1}]

A118199 Number of partitions of n having no parts equal to the size of their Durfee squares.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 2, 3, 5, 7, 10, 13, 18, 23, 31, 40, 53, 68, 89, 113, 146, 184, 234, 293, 369, 458, 572, 706, 874, 1073, 1320, 1611, 1970, 2393, 2909, 3518, 4255, 5122, 6167, 7394, 8862, 10585, 12637, 15038, 17886, 21213, 25141, 29723, 35112, 41383, 48737, 57278
Offset: 0

Views

Author

Emeric Deutsch, Apr 14 2006

Keywords

Comments

a(n) = A118198(n,0).
From Gus Wiseman, May 21 2022: (Start)
Also the number of integer partitions of n > 0 that have a fixed point but whose conjugate does not, ranked by A353316. For example, the a(5) = 1 through a(10) = 10 partitions are:
11111 222 322 422 522 622
111111 2221 2222 3222 4222
1111111 3221 4221 5221
22211 22221 22222
11111111 32211 32221
222111 42211
111111111 222211
322111
2221111
1111111111
Partitions w/ a fixed point: A001522 (unproved), ranked by A352827 (cf. A352874).
Partitions w/o a fixed point: A064428 (unproved), ranked by A352826 (cf. A352873).
Partitions w/ a fixed point and a conjugate fixed point: A188674, reverse A325187, ranked by A353317.
Partitions w/o a fixed point or conjugate fixed point: A188674 (shifted).
(End)

Examples

			a(7) = 3 because we have [7] with size of Durfee square 1, [4,3] with size of Durfee square 2 and [3,3,1] with size of Durfee square 2.
		

Crossrefs

Column k=0 of A118198.
A000041 counts partitions, strict A000009.
A000700 = self-conjugate partitions, ranked by A088902, complement A330644.
A002467 counts permutations with a fixed point, complement A000166.
A064410 counts partitions of crank 0, ranked by A342192.
A115720 and A115994 count partitions by Durfee square, rank stat A257990.
A238352 counts reversed partitions by fixed points, rank statistic A352822.
A238394 counts reversed partitions without a fixed point, ranked by A352830.
A238395 counts reversed partitions with a fixed point, ranked by A352872.
A352833 counts partitions by fixed points.

Programs

  • Maple
    g:=1+sum(x^(k^2+k)/(1-x^k)/product((1-x^i)^2,i=1..k-1),k=1..20): gser:=series(g,x=0,60): seq(coeff(gser,x,n),n=0..54);
    # second Maple program::
    b:= proc(n, i) option remember; `if`(n=0, 1,
          `if`(i<1, 0, b(n, i-1)+`if`(i>n, 0, b(n-i, i))))
        end:
    a:= n-> add(add(b(k, d) *b(n-d*(d+1)-k, d-1),
                    k=0..n-d*(d+1)), d=0..floor(sqrt(n))):
    seq(a(n), n=0..70);  # Alois P. Heinz, Apr 09 2012
  • Mathematica
    b[n_, i_] :=  b[n, i] = If[n == 0, 1, If[i<1, 0, b[n, i-1] + If[i>n, 0, b[n-i, i]]]]; a[n_] := Sum[Sum[b[k, d]*b[n-d*(d+1)-k, d-1], {k, 0, n-d*(d+1)}], {d, 0, Floor[Sqrt[n]]}]; Table[a[n], {n, 0, 70}] (* Jean-François Alcover, May 22 2015, after Alois P. Heinz *)
    pq[y_]:=Length[Select[Range[Length[y]],#==y[[#]]&]];
    conj[y_]:=If[Length[y]==0,y,Table[Length[Select[y,#>=k&]],{k,1,Max[y]}]];
    Table[Length[Select[IntegerPartitions[n],pq[#]>0&&pq[conj[#]]==0&]],{n,0,30}] (* a(0) = 0, Gus Wiseman, May 21 2022 *)

Formula

G.f.: 1+sum(x^(k^2+k)/[(1-x^k)*product((1-x^i)^2, i=1..k-1)], k=1..infinity).
a(n) ~ exp(Pi*sqrt(2*n/3)) / (16*n*sqrt(3)). - Vaclav Kotesovec, Jun 12 2025

A350841 Heinz numbers of integer partitions with a difference < -1 and a conjugate difference < -1.

Original entry on oeis.org

20, 28, 40, 44, 52, 56, 63, 68, 76, 80, 84, 88, 92, 99, 100, 104, 112, 116, 117, 124, 126, 132, 136, 140, 148, 152, 153, 156, 160, 164, 168, 171, 172, 176, 184, 188, 189, 196, 198, 200, 204, 207, 208, 212, 220, 224, 228, 232, 234, 236, 244, 248, 252, 260, 261
Offset: 1

Views

Author

Gus Wiseman, Jan 26 2022

Keywords

Comments

We define a difference of a partition to be a difference of two adjacent parts.

Examples

			The terms together with their prime indices begin:
   20: (3,1,1)
   28: (4,1,1)
   40: (3,1,1,1)
   44: (5,1,1)
   52: (6,1,1)
   56: (4,1,1,1)
   63: (4,2,2)
   68: (7,1,1)
   76: (8,1,1)
   80: (3,1,1,1,1)
   84: (4,2,1,1)
   88: (5,1,1,1)
   92: (9,1,1)
   99: (5,2,2)
		

Crossrefs

Heinz number rankings are in parentheses below.
Taking just one condition gives (A073492) and (A065201), counted by A239955.
These partitions are counted by A350839.
A000041 = integer partitions, strict A000009.
A034296 = partitions with no gaps (A073491), strict A001227 (A073485).
A090858 = partitions with a single gap of size 1 (A325284).
A116931 = partitions with no successions (A319630), strict A003114.
A116932 = partitions with no successions or gaps of size 1, strict A025157.
A350842 = partitions with no gaps of size 1, strict A350844, sets A005314.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    conj[y_]:=If[Length[y]==0,y,Table[Length[Select[y,#>=k&]],{k,1,Max[y]}]];
    Select[Range[100],(Min@@Differences[Reverse[primeMS[#]]]<-1)&&(Min@@Differences[conj[primeMS[#]]]<-1)&]

A352520 Number of integer compositions y of n with exactly one nonfixed point y(i) != i.

Original entry on oeis.org

0, 0, 2, 1, 4, 5, 3, 7, 8, 9, 6, 11, 12, 13, 14, 10, 16, 17, 18, 19, 20, 15, 22, 23, 24, 25, 26, 27, 21, 29, 30, 31, 32, 33, 34, 35, 28, 37, 38, 39, 40, 41, 42, 43, 44, 36, 46, 47, 48, 49, 50, 51, 52, 53, 54, 45, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 55, 67
Offset: 0

Views

Author

Gus Wiseman, Mar 29 2022

Keywords

Examples

			The a(2) = 2 through a(8) = 8 compositions:
  (2)    (3)  (4)      (5)      (6)    (7)        (8)
  (1,1)       (1,3)    (1,4)    (1,5)  (1,6)      (1,7)
              (2,2)    (3,2)    (4,2)  (5,2)      (6,2)
              (1,2,1)  (1,1,3)         (1,2,4)    (1,2,5)
                       (1,2,2)         (1,3,3)    (1,4,3)
                                       (2,2,3)    (3,2,3)
                                       (1,2,3,1)  (1,2,1,4)
                                                  (1,2,3,2)
		

Crossrefs

Compositions with no nonfixed points are counted by A010054.
The version for weak excedances is A177510.
Compositions with no fixed points are counted by A238351.
The version for fixed points is A240736.
This is column k = 1 of A352523.
A011782 counts compositions.
A238349 counts compositions by fixed points, rank stat A352512.
A352486 gives the nonfixed points of A122111, counted by A330644.
A352513 counts nonfixed points in standard compositions.

Programs

  • Mathematica
    pnq[y_]:=Length[Select[Range[Length[y]],#!=y[[#]]&]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],pnq[#]==1&]],{n,0,15}]

Extensions

More terms from Alois P. Heinz, Mar 30 2022
Showing 1-10 of 16 results. Next