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

A345192 Number of non-alternating compositions of n.

Original entry on oeis.org

0, 0, 1, 1, 4, 9, 20, 45, 99, 208, 437, 906, 1862, 3803, 7732, 15659, 31629, 63747, 128258, 257722, 517339, 1037652, 2079984, 4167325, 8346204, 16710572, 33449695, 66944254, 133959021, 268028868, 536231903, 1072737537, 2145905285, 4292486690, 8586035993, 17173742032, 34350108745, 68704342523, 137415168084
Offset: 0

Views

Author

Gus Wiseman, Jun 17 2021

Keywords

Comments

First differs from A261983 at a(6) = 20, A261983(6) = 18.
A sequence is alternating if it is alternately strictly increasing and strictly decreasing, starting with either. For example, the partition (3,2,2,2,1) has no alternating permutations, even though it does have the anti-run permutations (2,3,2,1,2) and (2,1,2,3,2).

Examples

			The a(2) = 1 through a(6) = 20 compositions:
  (11)  (111)  (22)    (113)    (33)
               (112)   (122)    (114)
               (211)   (221)    (123)
               (1111)  (311)    (222)
                       (1112)   (321)
                       (1121)   (411)
                       (1211)   (1113)
                       (2111)   (1122)
                       (11111)  (1131)
                                (1221)
                                (1311)
                                (2112)
                                (2211)
                                (3111)
                                (11112)
                                (11121)
                                (11211)
                                (12111)
                                (21111)
                                (111111)
		

Crossrefs

The complement is counted by A025047 (ascend: A025048, descend: A025049).
Dominates A261983 (non-anti-run compositions), ranked by A348612.
These compositions are ranked by A345168, complement A345167.
The case without twins is A348377.
The version for factorizations is A348613.
A001250 counts alternating permutations, complement A348615.
A003242 counts anti-run compositions.
A011782 counts compositions.
A032020 counts strict compositions.
A106356 counts compositions by number of maximal anti-runs.
A114901 counts compositions where each part is adjacent to an equal part.
A274174 counts compositions with equal parts contiguous.
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A344604 counts alternating compositions with twins.
A344605 counts alternating patterns with twins.
A344654 counts non-twin partitions with no alternating permutation.
A345162 counts normal partitions with no alternating permutation.
A345164 counts alternating permutations of prime indices.
A345170 counts partitions w/ alternating permutation, ranked by A345172.
A345165 counts partitions w/o alternating permutation, ranked by A345171.
Patterns:
- A128761 avoiding (1,2,3) adjacent.
- A344614 avoiding (1,2,3) and (3,2,1) adjacent.
- A344615 weakly avoiding (1,2,3) adjacent.

Programs

  • Mathematica
    wigQ[y_]:=Or[Length[y]==0,Length[Split[y]]== Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!wigQ[#]&]],{n,0,15}]

Formula

a(n) = A011782(n) - A025047(n).

A345165 Number of integer partitions of n without an alternating permutation.

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 5, 5, 8, 11, 17, 20, 29, 37, 51, 65, 85, 106, 141, 175, 223, 277, 351, 432, 540, 663, 820, 999, 1226, 1489, 1817, 2192, 2654, 3191, 3847, 4603, 5517, 6578, 7853, 9327, 11084, 13120, 15533, 18328, 21621, 25430, 29905, 35071, 41111, 48080, 56206, 65554, 76420, 88918
Offset: 0

Views

Author

Gus Wiseman, Jun 12 2021

Keywords

Comments

A sequence is alternating if it is alternately strictly increasing and strictly decreasing, starting with either. For example, the partition (3,2,2,2,1) has no alternating permutations, even though it has the anti-run permutations (2,3,2,1,2) and (2,1,2,3,2).

Examples

			The a(2) = 1 through a(9) = 11 partitions:
  (11)  (111)  (22)    (2111)   (33)      (2221)     (44)        (333)
               (1111)  (11111)  (222)     (4111)     (2222)      (3222)
                                (3111)    (31111)    (5111)      (6111)
                                (21111)   (211111)   (41111)     (22221)
                                (111111)  (1111111)  (221111)    (51111)
                                                     (311111)    (321111)
                                                     (2111111)   (411111)
                                                     (11111111)  (2211111)
                                                                 (3111111)
                                                                 (21111111)
                                                                 (111111111)
		

Crossrefs

Excluding twins (x,x) gives A344654, complement A344740.
The normal case is A345162, complement A345163.
The complement is counted by A345170, ranked by A345172.
The Heinz numbers of these partitions are A345171.
The version for factorizations is A348380, complement A348379.
A version for ordered factorizations is A348613, complement A348610.
A000041 counts integer partitions.
A001250 counts alternating permutations, complement A348615.
A003242 counts anti-run compositions.
A005649 counts anti-run patterns.
A025047 counts alternating or wiggly compositions.
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A344604 counts alternating compositions with twins.
A345164 counts alternating permutations of prime indices, w/ twins A344606.
A345192 counts non-alternating compositions, without twins A348377.

Programs

  • Mathematica
    wigQ[y_]:=Or[Length[y]==0,Length[Split[y]]== Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
    Table[Length[Select[IntegerPartitions[n],Select[Permutations[#],wigQ]=={}&]],{n,0,15}]

Extensions

a(26) onwards by Joseph Likar, Aug 21 2023

A345168 Numbers k such that the k-th composition in standard order is not alternating.

Original entry on oeis.org

3, 7, 10, 11, 14, 15, 19, 21, 23, 26, 27, 28, 29, 30, 31, 35, 36, 37, 39, 42, 43, 46, 47, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 67, 69, 71, 73, 74, 75, 78, 79, 83, 84, 85, 86, 87, 90, 91, 92, 93, 94, 95, 99, 100, 101, 103, 104, 105, 106, 107, 110
Offset: 1

Views

Author

Gus Wiseman, Jun 15 2021

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
A sequence is alternating if it is alternately strictly increasing and strictly decreasing, starting with either. For example, the partition (3,2,2,2,1) has no alternating permutations, even though it does have the anti-run permutations (2,3,2,1,2) and (2,1,2,3,2).

Examples

			The sequence of terms together with their binary indices begins:
     3: (1,1)          35: (4,1,1)        59: (1,1,2,1,1)
     7: (1,1,1)        36: (3,3)          60: (1,1,1,3)
    10: (2,2)          37: (3,2,1)        61: (1,1,1,2,1)
    11: (2,1,1)        39: (3,1,1,1)      62: (1,1,1,1,2)
    14: (1,1,2)        42: (2,2,2)        63: (1,1,1,1,1,1)
    15: (1,1,1,1)      43: (2,2,1,1)      67: (5,1,1)
    19: (3,1,1)        46: (2,1,1,2)      69: (4,2,1)
    21: (2,2,1)        47: (2,1,1,1,1)    71: (4,1,1,1)
    23: (2,1,1,1)      51: (1,3,1,1)      73: (3,3,1)
    26: (1,2,2)        52: (1,2,3)        74: (3,2,2)
    27: (1,2,1,1)      53: (1,2,2,1)      75: (3,2,1,1)
    28: (1,1,3)        55: (1,2,1,1,1)    78: (3,1,1,2)
    29: (1,1,2,1)      56: (1,1,4)        79: (3,1,1,1,1)
    30: (1,1,1,2)      57: (1,1,3,1)      83: (2,3,1,1)
    31: (1,1,1,1,1)    58: (1,1,2,2)      84: (2,2,3)
		

Crossrefs

The complement is A345167.
These compositions are counted by A345192.
A001250 counts alternating permutations, complement A348615.
A003242 counts anti-run compositions.
A025047 counts alternating or wiggly compositions, directed A025048, A025049.
A344604 counts alternating compositions with twins.
A345194 counts alternating patterns (with twins: A344605).
A345164 counts alternating permutations of prime indices (with twins: A344606).
A345165 counts partitions without a alternating permutation, ranked by A345171.
A345170 counts partitions with a alternating permutation, ranked by A345172.
A348610 counts alternating ordered factorizations, complement A348613.
Statistics of standard compositions:
- Length is A000120.
- Constant runs are A124767.
- Heinz number is A333219.
- Number of maximal anti-runs is A333381.
- Runs-resistance is A333628.
- Number of distinct parts is A334028.
Classes of standard compositions:
- Weakly decreasing compositions (partitions) are A114994.
- Weakly increasing compositions (multisets) are A225620.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Anti-run compositions are A333489.
- Non-anti-run compositions are A348612.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    wigQ[y_]:=Or[Length[y]==0,Length[Split[y]]==Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
    Select[Range[0,100],Not@*wigQ@*stc]

A348615 Number of non-alternating permutations of {1...n}.

Original entry on oeis.org

0, 0, 0, 2, 14, 88, 598, 4496, 37550, 347008, 3527758, 39209216, 473596070, 6182284288, 86779569238, 1303866853376, 20884006863710, 355267697410048, 6397563946377118, 121586922638606336, 2432161265800164950, 51081039175603191808, 1123862030028821404198
Offset: 0

Views

Author

Gus Wiseman, Nov 03 2021

Keywords

Comments

A sequence is alternating if it is alternately strictly increasing and strictly decreasing, starting with either.
Also permutations of {1...n} matching the consecutive patterns (1,2,3) or (3,2,1). Matching only one of these gives A065429.

Examples

			The a(4) = 14 permutations:
  (1,2,3,4)  (3,1,2,4)
  (1,2,4,3)  (3,2,1,4)
  (1,3,4,2)  (3,4,2,1)
  (1,4,3,2)  (4,1,2,3)
  (2,1,3,4)  (4,2,1,3)
  (2,3,4,1)  (4,3,1,2)
  (2,4,3,1)  (4,3,2,1)
		

Crossrefs

The complement is counted by A001250, ranked by A333218.
The complementary version for compositions is A025047, ranked by A345167.
A directed version is A065429, complement A049774.
The version for compositions is A345192, ranked by A345168.
The version for ordered factorizations is A348613, complement A348610.
A345165 counts partitions w/o an alternating permutation, ranked by A345171.
A345170 counts partitions w/ an alternating permutation, ranked by A345172.
A348379 counts factorizations with an alternating permutation.
A348380 counts factorizations without an alternating permutation.

Programs

  • Maple
    b:= proc(u, o) option remember;
          `if`(u+o=0, 1, add(b(o-1+j, u-j), j=1..u))
        end:
    a:= n-> n!-`if`(n<2, 1, 2)*b(n, 0):
    seq(a(n), n=0..30);  # Alois P. Heinz, Nov 04 2021
  • Mathematica
    wigQ[y_]:=Or[Length[y]==0,Length[Split[y]] ==Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
    Table[Length[Select[Permutations[Range[n]],!wigQ[#]&]],{n,0,6}]
  • Python
    from itertools import accumulate, count, islice
    def A348615_gen(): # generator of terms
        yield from (0,0)
        blist, f = (0,2), 1
        for n in count(2):
            f *= n
            yield f - (blist := tuple(accumulate(reversed(blist),initial=0)))[-1]
    A348615_list = list(islice(A348615_gen(),40)) # Chai Wah Wu, Jun 09-11 2022

Formula

a(n) = n! - A001250(n).

A345171 Numbers whose multiset of prime factors has no alternating permutation.

Original entry on oeis.org

4, 8, 9, 16, 24, 25, 27, 32, 40, 48, 49, 54, 56, 64, 80, 81, 88, 96, 104, 112, 121, 125, 128, 135, 136, 144, 152, 160, 162, 169, 176, 184, 189, 192, 208, 224, 232, 240, 243, 248, 250, 256, 270, 272, 288, 289, 296, 297, 304, 320, 324, 328, 336, 343, 344, 351
Offset: 1

Views

Author

Gus Wiseman, Jun 13 2021

Keywords

Comments

First differs from A335448 in having 270.
A sequence is alternating if it is alternately strictly increasing and strictly decreasing, starting with either. For example, the partition (3,2,2,2,1) has no alternating permutations, even though it has the anti-run permutations (2,3,2,1,2) and (2,1,2,3,2).
Also Heinz numbers of integer partitions without a wiggly permutation, where the Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			The sequence of terms together with their prime indices begins:
    4: {1,1}
    8: {1,1,1}
    9: {2,2}
   16: {1,1,1,1}
   24: {1,1,1,2}
   25: {3,3}
   27: {2,2,2}
   32: {1,1,1,1,1}
   40: {1,1,1,3}
   48: {1,1,1,1,2}
   49: {4,4}
   54: {1,2,2,2}
   56: {1,1,1,4}
   64: {1,1,1,1,1,1}
   80: {1,1,1,1,3}
   81: {2,2,2,2}
   88: {1,1,1,5}
   96: {1,1,1,1,1,2}
		

Crossrefs

Removing squares of primes A001248 gives A344653, counted by A344654.
A superset of A335448, which is counted by A325535.
Positions of 0's in A345164.
The partitions with these Heinz numbers are counted by A345165.
The complement is A345172, counted by A345170.
The separable case is A345173, counted by A345166.
A001250 counts alternating permutations, complement A348615.
A003242 counts anti-run compositions, complement A261983.
A025047 counts alternating or wiggly compositions, directed A025048, A025049.
A325534 counts separable partitions, ranked by A335433.
A344606 counts alternating permutations of prime indices with twins.
A344742 ranks twins and partitions with an alternating permutation.
A345192 counts non-alternating compositions.

Programs

  • Mathematica
    wigQ[y_]:=Or[Length[y]==0,Length[Split[y]]== Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
    Select[Range[100],Select[Permutations[Flatten[ ConstantArray@@@FactorInteger[#]]],wigQ]=={}&]

A348379 Number of factorizations of n with an alternating permutation.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 2, 3, 1, 4, 1, 4, 2, 2, 1, 6, 1, 2, 2, 4, 1, 5, 1, 5, 2, 2, 2, 8, 1, 2, 2, 6, 1, 5, 1, 4, 4, 2, 1, 10, 1, 4, 2, 4, 1, 6, 2, 6, 2, 2, 1, 11, 1, 2, 4, 6, 2, 5, 1, 4, 2, 5, 1, 15, 1, 2, 4, 4, 2, 5, 1, 10, 3, 2, 1, 11, 2
Offset: 1

Views

Author

Gus Wiseman, Oct 28 2021

Keywords

Comments

First differs from A335434 at a(216) = 27, A335434(216) = 28. Also differs from A335434 at a(270) = 19, A335434(270) = 20.
A factorization of n is a weakly increasing sequence of positive integers > 1 with product n.
All of the counted factorizations are separable (A335434).
A sequence is alternating if it is alternately strictly increasing and strictly decreasing, starting with either. For example, the partition (3,2,2,2,1) has no alternating permutations, even though it does have the anti-run permutations (2,3,2,1,2) and (2,1,2,3,2). Alternating permutations of multisets are a generalization of alternating or up-down permutations of {1..n}.

Examples

			The a(270) = 19 factorizations:
  (2*3*3*15)  (2*3*45)  (2*135)  (270)
  (2*3*5*9)   (2*5*27)  (3*90)
  (3*3*5*6)   (2*9*15)  (5*54)
              (3*3*30)  (6*45)
              (3*5*18)  (9*30)
              (3*6*15)  (10*27)
              (3*9*10)  (15*18)
              (5*6*9)
		

Crossrefs

Partitions not of this type are counted by A345165, ranked by A345171.
Partitions of this type are counted by A345170, ranked by A345172.
Twins and partitions of this type are counted by A344740, ranked by A344742.
The case with twins is A347050.
The complement is counted by A348380, without twins A347706.
The ordered version is A348610.
A001055 counts factorizations, strict A045778, ordered A074206.
A001250 counts alternating permutations.
A025047 counts alternating or wiggly compositions, ranked by A345167.
A339846 counts even-length factorizations.
A339890 counts odd-length factorizations.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    wigQ[y_]:=Or[Length[y]==0,Length[Split[y]]==Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
    Table[Length[Select[facs[n],Select[Permutations[#],wigQ]!={}&]],{n,100}]

Formula

a(2^n) = A345170(n).

A348610 Number of alternating ordered factorizations of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 3, 1, 3, 1, 6, 1, 3, 3, 4, 1, 6, 1, 6, 3, 3, 1, 12, 1, 3, 3, 6, 1, 11, 1, 7, 3, 3, 3, 15, 1, 3, 3, 12, 1, 11, 1, 6, 6, 3, 1, 23, 1, 6, 3, 6, 1, 12, 3, 12, 3, 3, 1, 28, 1, 3, 6, 12, 3, 11, 1, 6, 3, 11, 1, 33, 1, 3, 6, 6, 3, 11, 1, 23, 4, 3
Offset: 1

Views

Author

Gus Wiseman, Nov 05 2021

Keywords

Comments

An ordered factorization of n is a finite sequence of positive integers > 1 with product n.
A sequence is alternating if it is alternately strictly increasing and strictly decreasing, starting with either. For example, the partition (3,2,2,2,1) has no alternating permutations, even though it does have the anti-run permutations (2,3,2,1,2) and (2,1,2,3,2).

Examples

			The alternating ordered factorizations of n = 1, 6, 12, 16, 24, 30, 32, 36:
  ()   6     12      16      24      30      32      36
       2*3   2*6     2*8     3*8     5*6     4*8     4*9
       3*2   3*4     8*2     4*6     6*5     8*4     9*4
             4*3     2*4*2   6*4     10*3    16*2    12*3
             6*2             8*3     15*2    2*16    18*2
             2*3*2           12*2    2*15    2*8*2   2*18
                             2*12    3*10    4*2*4   3*12
                             2*4*3   2*5*3           2*6*3
                             2*6*2   3*2*5           2*9*2
                             3*2*4   3*5*2           3*2*6
                             3*4*2   5*2*3           3*4*3
                             4*2*3                   3*6*2
                                                     6*2*3
                                                     2*3*2*3
                                                     3*2*3*2
		

Crossrefs

The additive version (compositions) is A025047 ranked by A345167.
The complementary additive version is A345192, ranked by A345168.
Dominated by A348611 (the anti-run version) at positions A122181.
The complement is counted by A348613.
A001055 counts factorizations, strict A045778, ordered A074206.
A001250 counts alternating permutations, complement A348615.
A339846 counts even-length factorizations.
A339890 counts odd-length factorizations.
A345165 counts partitions w/o an alternating permutation, ranked by A345171.
A345170 counts partitions w/ an alternating permutation, ranked by A345172.
A347463 counts ordered factorizations with integer alternating product.
A348379 counts factorizations w/ an alternating permutation.
A348380 counts factorizations w/o an alternating permutation.

Programs

  • Mathematica
    ordfacs[n_]:=If[n<=1,{{}},Join@@Table[Prepend[#,d]&/@ordfacs[n/d],{d,Rest[Divisors[n]]}]];
    wigQ[y_]:=Or[Length[y]==0,Length[Split[y]] == Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
    Table[Length[Select[ordfacs[n],wigQ]],{n,100}]

A347706 Number of factorizations of n that are not a twin (x*x) nor have an alternating permutation.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Oct 28 2021

Keywords

Comments

First differs from A348381 at a(216) = 4, A348381(216) = 3.
A factorization of n is a weakly increasing sequence of positive integers > 1 with product n.
A sequence is alternating if it is alternately strictly increasing and strictly decreasing, starting with either. For example, the partition (3,2,2,2,1) has no alternating permutations, even though it does have the anti-run permutations (2,3,2,1,2) and (2,1,2,3,2). Alternating permutations of multisets are a generalization of alternating or up-down permutations of sets.

Examples

			The a(n) factorizations for n = 96, 192, 2160, 576:
  2*2*2*12      3*4*4*4         3*3*3*80       4*4*4*9
  2*2*2*2*6     2*2*2*24        6*6*6*10       2*2*2*72
  2*2*2*2*2*3   2*2*2*2*12      2*2*2*270      2*2*2*2*36
                2*2*2*2*2*6     2*3*3*3*40     2*2*2*2*4*9
                2*2*2*2*3*4     2*2*2*2*135    2*2*2*2*6*6
                2*2*2*2*2*2*3   2*2*2*2*3*45   2*2*2*2*2*18
                                2*2*2*2*5*27   2*2*2*2*3*12
                                2*2*2*2*9*15   2*2*2*2*2*2*9
                                               2*2*2*2*2*3*6
                                               2*2*2*2*2*2*3*3
		

Crossrefs

Positions of nonzero terms are A046099.
Partitions of this type are counted by A344654, ranked by A344653.
Partitions not of this type are counted by A344740, ranked by A344742.
The complement is counted by A347050, without twins A348379.
The version for compositions is A348377.
The version allowing twins is A348380.
The inseparable case is A348381.
A001055 counts factorizations, strict A045778, ordered A074206.
A001250 counts alternating permutations of sets.
A025047 counts alternating or wiggly compositions, ranked by A345167.
A339846 counts even-length factorizations.
A339890 counts odd-length factorizations.
A347438 counts factorizations with alternating product 1, additive A119620.
A348610 counts alternating ordered factorizations.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[facs[n],Function[f,Select[Permutations[f],!MatchQ[#,{_,x_,y_,z_,_}/;x<=y<=z||x>=y>=z]&]=={}]]],{n,100}]

Formula

a(2^n) = A344654(n).

A348613 Number of non-alternating ordered factorizations of n.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 2, 0, 0, 0, 4, 0, 2, 0, 2, 0, 0, 0, 8, 1, 0, 1, 2, 0, 2, 0, 9, 0, 0, 0, 11, 0, 0, 0, 8, 0, 2, 0, 2, 2, 0, 0, 25, 1, 2, 0, 2, 0, 8, 0, 8, 0, 0, 0, 16, 0, 0, 2, 20, 0, 2, 0, 2, 0, 2, 0, 43, 0, 0, 2, 2, 0, 2, 0, 25, 4, 0, 0, 16, 0
Offset: 1

Views

Author

Gus Wiseman, Nov 03 2021

Keywords

Comments

An ordered factorization of n is a finite sequence of positive integers > 1 with product n.
A sequence is alternating if it is alternately strictly increasing and strictly decreasing, starting with either.

Examples

			The a(n) ordered factorizations for n = 4, 12, 16, 24, 32, 36:
  2*2   2*2*3   4*4       2*2*6     2*2*8       6*6
        3*2*2   2*2*4     2*3*4     2*4*4       2*2*9
                4*2*2     4*3*2     4*4*2       2*3*6
                2*2*2*2   6*2*2     8*2*2       3*3*4
                          2*2*2*3   2*2*2*4     4*3*3
                          2*2*3*2   2*2*4*2     6*3*2
                          2*3*2*2   2*4*2*2     9*2*2
                          3*2*2*2   4*2*2*2     2*2*3*3
                                    2*2*2*2*2   2*3*3*2
                                                3*2*2*3
                                                3*3*2*2
		

Crossrefs

The complementary additive version is A025047, ranked by A345167.
The additive version is A345192, ranked by A345168, without twins A348377.
The complement is counted by A348610.
A001055 counts factorizations, strict A045778, ordered A074206.
A001250 counts alternating permutations.
A339846 counts even-length factorizations.
A339890 counts odd-length factorizations.
A345165 counts partitions without an alternating permutation, ranked by A345171.
A345170 counts partitions with an alternating permutation, ranked by A345172.
A348379 counts factorizations w/ an alternating permutation, with twins A347050.
A348380 counts factorizations w/o an alternating permutation, w/o twins A347706.
A348611 counts anti-run ordered factorizations.

Programs

  • Mathematica
    ordfacs[n_]:=If[n<=1,{{}},Join@@Table[Prepend[#,d]&/@ordfacs[n/d],{d,Rest[Divisors[n]]}]];
    wigQ[y_]:=Or[Length[y]==0,Length[Split[y]]==Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
    Table[Length[Select[ordfacs[n],!wigQ[#]&]],{n,100}]

A345173 Numbers whose multiset of prime factors is separable but has no alternating permutation.

Original entry on oeis.org

270, 378, 594, 702, 918, 1026, 1242, 1566, 1620, 1674, 1750, 1998, 2214, 2268, 2322, 2538, 2625, 2750, 2862, 3186, 3250, 3294, 3564, 3618, 3834, 3942, 4050, 4125, 4212, 4250, 4266, 4482, 4750, 4806, 4875, 5238, 5454, 5508, 5562, 5670, 5750, 5778, 5886, 6102
Offset: 1

Views

Author

Gus Wiseman, Jun 13 2021

Keywords

Comments

A multiset is separable if it has an anti-run permutation (no adjacent parts equal).
A sequence is alternating if it is alternately strictly increasing and strictly decreasing, starting with either. For example, the partition (3,2,2,2,1) has no alternating permutations, even though it has the anti-run permutations (2,3,2,1,2) and (2,1,2,3,2).
The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.

Examples

			The terms together with their prime indices begin:
   270: {1,2,2,2,3}
   378: {1,2,2,2,4}
   594: {1,2,2,2,5}
   702: {1,2,2,2,6}
   918: {1,2,2,2,7}
  1026: {1,2,2,2,8}
  1242: {1,2,2,2,9}
  1566: {1,2,2,2,10}
  1620: {1,1,2,2,2,2,3}
  1674: {1,2,2,2,11}
  1750: {1,3,3,3,4}
  1998: {1,2,2,2,12}
  2214: {1,2,2,2,13}
  2268: {1,1,2,2,2,2,4}
  2322: {1,2,2,2,14}
		

Crossrefs

The partitions with these Heinz numbers are counted by A345166.
Permutations of this type are ranked by A345169.
Numbers with a factorization of this type are counted by A348609.
A000041 counts integer partitions.
A001250 counts alternating permutations, complement A348615.
A003242 counts anti-run compositions.
A025047 counts alternating compositions, ascend A025048, descend A025049.
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A344606 counts alternating permutations of prime indices with twins.
A344740 counts twins and partitions with an alternating permutation.
A345164 counts alternating permutations of prime factors.
A345165 counts partitions without an alternating permutation.
A345170 counts partitions with an alternating permutation.
A345192 counts non-alternating compositions, without twins A348377.
A348379 counts factorizations with an alternating permutation.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    wigQ[y_]:=Or[Length[y]==0,Length[Split[y]]== Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
    sepQ[y_]:=!MatchQ[y,{_,x_,x_,_}];
    Select[Range[1000],Select[Permutations[primeMS[#]],wigQ]=={}&&!Select[Permutations[primeMS[#]],sepQ]=={}&]

Formula

Equals A345171 /\ A335433.
Showing 1-10 of 21 results. Next