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.

Previous Showing 21-25 of 25 results.

A333193 Number of compositions of n whose non-adjacent parts are strictly decreasing.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 15, 21, 29, 40, 53, 71, 93, 122, 158, 204, 260, 332, 419, 528, 661, 825, 1023, 1267, 1560, 1916, 2344, 2860, 3476, 4217, 5097, 6147, 7393, 8872, 10618, 12685, 15115, 17977, 21336, 25276, 29882, 35271, 41551, 48872, 57385, 67277, 78745, 92040
Offset: 0

Views

Author

Gus Wiseman, May 18 2020

Keywords

Examples

			The a(1) = 1 through a(7) = 15 compositions:
  (1)  (2)   (3)   (4)    (5)    (6)     (7)
       (11)  (12)  (13)   (14)   (15)    (16)
             (21)  (22)   (23)   (24)    (25)
                   (31)   (32)   (33)    (34)
                   (211)  (41)   (42)    (43)
                          (221)  (51)    (52)
                          (311)  (231)   (61)
                                 (312)   (241)
                                 (321)   (322)
                                 (411)   (331)
                                 (2211)  (412)
                                         (421)
                                         (511)
                                         (2311)
                                         (3211)
For example, (2,3,1,2) is not such a composition, because the non-adjacent pairs of parts are (2,1), (2,2), (3,2), not all of which are strictly decreasing, while (2,4,1,1) is such a composition, because the non-adjacent pairs of parts are (2,1), (2,1), (4,1), all of which are strictly decreasing.
		

Crossrefs

A version for ordered set partitions is A332872.
The case of strict compositions is A333150.
The case of normal sequences appears to be A001045.
Unimodal compositions are A001523, with strict case A072706.
Strict compositions are A032020.
Partitions with strictly increasing run-lengths are A100471.
Partitions with strictly decreasing run-lengths are A100881.
Compositions with weakly decreasing non-adjacent parts are A333148.
Compositions with strictly increasing run-lengths are A333192.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MatchQ[#,{_,x_,,y_,_}/;y>=x]&]],{n,0,15}]
  • PARI
    \\ p is all, q is those ending in an unreversed singleton.
    seq(n)={my(q=O(x*x^n), p=1+q); for(k=1, n, [p,q] = [p*(1 + x^k + x^(2*k)) + q*x^k, q + p*x^k] ); Vec(p)} \\ Andrew Howroyd, Apr 17 2021

Extensions

Terms a(21) and beyond from Andrew Howroyd, Apr 17 2021

A383111 Number of integer partitions of n having more than one permutation with all distinct run-lengths.

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 3, 8, 9, 13, 17, 26, 27, 43, 51, 61, 78, 103, 115, 153, 174, 213, 255, 316, 354, 442, 508, 610, 701, 848, 950, 1153, 1303, 1539, 1750, 2075, 2318, 2738, 3081
Offset: 0

Views

Author

Gus Wiseman, Apr 20 2025

Keywords

Examples

			The partition (2,1,1) has two permutations with all distinct run-lengths: (1,1,2), (2,1,1), so it is counted under a(4).
The a(4) = 1 through a(9) = 13 partitions:
  (211)  (221)   (411)    (322)     (332)      (441)
         (311)   (3111)   (331)     (422)      (522)
         (2111)  (21111)  (511)     (611)      (711)
                          (2221)    (5111)     (3222)
                          (4111)    (22211)    (6111)
                          (22111)   (41111)    (22221)
                          (31111)   (221111)   (33111)
                          (211111)  (311111)   (51111)
                                    (2111111)  (222111)
                                               (411111)
                                               (2211111)
                                               (3111111)
                                               (21111111)
		

Crossrefs

For a unique choice we have A000005, ranks A000961.
For at least one choice we have A239455, ranks A351294, conjugate A381432.
For no choices we have A351293, ranks A351295, conjugate A381433.
The complement is A351293 + A000005, ranks too dense.
For equal instead of distinct run-lengths we have A383090, ranks A383089.
These partitions are ranked by A383113 = positions of terms > 1 in A382771.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A329738 counts compositions with equal run-lengths, ranks A353744.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], Length[Select[Permutations[#], UnsameQ@@Length/@Split[#]&]]>1&]],{n,0,15}]

Extensions

a(21)-a(38) from Jakub Buczak, May 04 2025

A244395 Number of partitions of n in which the largest summand has frequency 1, the next largest summand has frequency at most 2, the third largest has frequency at most 3, etc.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 5, 8, 11, 15, 20, 26, 34, 46, 59, 78, 101, 129, 163, 209, 261, 329, 412, 517, 641, 798, 986, 1216, 1493, 1829, 2229, 2721, 3303, 4000, 4841, 5841, 7034, 8458, 10144, 12137, 14512, 17306, 20596, 24483, 29045, 34391, 40680, 48032, 56627, 66666
Offset: 0

Views

Author

David S. Newman, Jul 03 2014

Keywords

Examples

			For n=6 the partitions counted are: 6, 51, 42, 411, 321.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1, t) +add(b(n-i*j, i-1, t+1), j=1..min(t, n/i))))
        end:
    a:= n-> b(n$2, 1):
    seq(a(n), n=0..60);  # Alois P. Heinz, Jul 03 2014
  • Mathematica
    nend = 20;
    For[n = 1, n <= nend, n++,
    count[n] = 0;
    Ip = IntegerPartitions[n];
    For[i = 1, i <= Length[Ip], i++,
    m = Max[Ip[[i]]];
    condition = True;
    Tip = Tally[Ip[[i]]];
    For[j = 1, j <= Length[Tip], j++,
    condition = condition && (Tip[[j]][[2]] <= j)];
    If[condition, count[n]++ (* ; Print[Ip[[i]]] *)]];
    ]
    Table[count[i], {i, 1, nend}]
    (* Second program: *)
    b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1, If[i < 1, 0,
        b[n, i-1, t] + Sum[b[n-i*j, i-1, t+1], {j, 1, Min[t, n/i]}]]];
    a[n_] := b[n, n, 1];
    a /@ Range[0, 60] (* Jean-François Alcover, Jun 06 2021, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, Jul 03 2014

A296116 Number of partitions in which each summand, s, may be used with frequency f if f divides s.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 4, 6, 9, 12, 14, 18, 23, 29, 35, 43, 56, 68, 82, 100, 122, 147, 174, 209, 252, 302, 356, 421, 500, 589, 690, 808, 952, 1110, 1292, 1505, 1756, 2034, 2348, 2715, 3139, 3620, 4156, 4778, 5492, 6296, 7195, 8220, 9398, 10714, 12194, 13872, 15784
Offset: 0

Views

Author

David S. Newman, Dec 04 2017

Keywords

Examples

			For n=3, the partitions counted are 3 and 2+1.
For n=4: 4, 3+1, 2+2.
For n=5: 5, 4+1, 3+2, 2+2+1.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1 or n<0, 0,
          b(n, i-1)+add(b(n-i*j, i-1), j=numtheory[divisors](i))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..60);  # Alois P. Heinz, Dec 05 2017
  • Mathematica
    iend = 30;
    s = Series[Product[1 + Sum[x^(Divisors[n][[i]] n), {i, 1, Length[Divisors[n]]}], {n, 1, iend}], {x, 0, iend}]; Print[s];
    CoefficientList[s, x]

Formula

G.f.: Product_{n >= 1} (1 + Sum_{d divides n} x^(d*n)).

Extensions

More terms from Alois P. Heinz, Dec 05 2017

A383088 Numbers whose multiset of prime indices does not have all equal run-sums.

Original entry on oeis.org

6, 10, 14, 15, 18, 20, 21, 22, 24, 26, 28, 30, 33, 34, 35, 36, 38, 39, 42, 44, 45, 46, 48, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100, 102, 104, 105
Offset: 1

Views

Author

Gus Wiseman, Apr 17 2025

Keywords

Comments

First differs from A381871 in having 36.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798, sum A056239.

Examples

			The prime indices of 36 are {1,1,2,2}, with run-sums (2,4), so 36 is in the sequence, even though we have the multiset partition {{1,1},{2},{2}} with equal sums.
The terms together with their prime indices begin:
    6: {1,2}
   10: {1,3}
   14: {1,4}
   15: {2,3}
   18: {1,2,2}
   20: {1,1,3}
   21: {2,4}
   22: {1,5}
   24: {1,1,1,2}
   26: {1,6}
   28: {1,1,4}
   30: {1,2,3}
   33: {2,5}
   34: {1,7}
   35: {3,4}
   36: {1,1,2,2}
   38: {1,8}
   39: {2,6}
   42: {1,2,4}
   44: {1,1,5}
   45: {2,2,3}
   46: {1,9}
		

Crossrefs

For run-lengths instead of sums we have A059404, distinct A130092.
The complement is A353833, counted by A304442.
For distinct instead of equal run-sums we have A353839.
Partitions of this type are counted by A382076.
Counting and ranking partitions by run-lengths and run-sums:
- constant: A047966 (ranks A072774), sums A304442 (ranks A353833)
- distinct: A098859 (ranks A130091), sums A353837 (ranks A353838)
- weakly decreasing: A100882 (ranks A242031), sums A304405 (ranks A357875)
- weakly increasing: A100883 (ranks A304678), sums A304406 (ranks A357861)
- strictly decreasing: A100881 (ranks A304686), sums A304428 (ranks A357862)
- strictly increasing: A100471 (ranks A334965), sums A304430 (ranks A357864)
A001222 counts prime factors, distinct A001221.
A056239 adds up prime indices, row sums of A112798.
A326534 ranks multiset partitions with a common sum, counted by A321455, normal A326518.
A353851 counts compositions with a common run-sum, ranks A353848.
A353862 gives the greatest run-sum of prime indices, least A353931.
A382877 counts permutations of prime indices with equal run-sums, zeros A383100.
A383098 counts partitions with a permutation having all equal run-sums, ranks A383110.

Programs

  • Mathematica
    Select[Range[100], !SameQ@@Cases[FactorInteger[#],{p_,k_}:>PrimePi[p]*k]&]
Previous Showing 21-25 of 25 results.