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-7 of 7 results.

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).

A349800 Number of integer compositions of n that are weakly alternating and have at least two adjacent equal parts.

Original entry on oeis.org

0, 0, 1, 1, 4, 9, 16, 33, 62, 113, 205, 373, 664, 1190, 2113, 3744, 6618, 11683, 20564, 36164, 63489, 111343, 195042, 341357, 596892, 1042976, 1821179, 3178145, 5543173, 9663545, 16839321, 29332231, 51075576, 88908912, 154722756, 269186074, 468221264
Offset: 0

Views

Author

Gus Wiseman, Dec 16 2021

Keywords

Comments

We define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either.
This sequence counts compositions that are weakly but not strongly alternating; also weakly alternating non-anti-run compositions.

Examples

			The a(2) = 1 through a(6) = 16 compositions:
  (1,1)  (1,1,1)  (2,2)      (1,1,3)      (3,3)
                  (1,1,2)    (1,2,2)      (1,1,4)
                  (2,1,1)    (2,2,1)      (2,2,2)
                  (1,1,1,1)  (3,1,1)      (4,1,1)
                             (1,1,1,2)    (1,1,1,3)
                             (1,1,2,1)    (1,1,2,2)
                             (1,2,1,1)    (1,1,3,1)
                             (2,1,1,1)    (1,3,1,1)
                             (1,1,1,1,1)  (2,2,1,1)
                                          (3,1,1,1)
                                          (1,1,1,1,2)
                                          (1,1,1,2,1)
                                          (1,1,2,1,1)
                                          (1,2,1,1,1)
                                          (2,1,1,1,1)
                                          (1,1,1,1,1,1)
		

Crossrefs

This is the weakly alternating case of A345192, ranked by A345168.
The case of partitions is A349795, ranked by A350137.
The version counting permutations of prime indices is A349798.
These compositions are ranked by A349799.
A001250 = alternating permutations, ranked by A349051, complement A348615.
A003242 = Carlitz (anti-run) compositions, ranked by A333489.
A025047/A025048/A025049 = alternating compositions, ranked by A345167.
A261983 = non-anti-run compositions, ranked by A348612.
A345165 = partitions without an alternating permutation, ranked by A345171.
A345170 = partitions with an alternating permutation, ranked by A345172.
A345173 = non-alternating anti-run partitions, ranked by A345166.
A345195 = non-alternating anti-run compositions, ranked by A345169.
A348377 = non-alternating non-twin compositions.
A349801 = non-alternating partitions, ranked by A289553.
Weakly alternating:
- A349052 = compositions, directed A129852/A129853, complement A349053.
- A349056 = permutations of prime indices, complement A349797.
- A349057 = complement of standard composition numbers (too dense).
- A349058 = patterns, complement A350138.
- A349059 = ordered factorizations, complement A350139.
- A349060 = partitions, complement A349061.

Programs

  • Mathematica
    wigQ[y_]:=Or[Length[y]==0,Length[Split[y]]==Length[y] &&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
    whkQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]<=y[[m+1]],y[[m]]>=y[[m+1]]],{m,1,Length[y]-1}];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],(whkQ[#]||whkQ[-#])&&!wigQ[#]&]],{n,0,10}]

Formula

a(n) = A349052(n) - A025047(n). - Andrew Howroyd, Jan 31 2024

Extensions

a(21) onwards from Andrew Howroyd, Jan 31 2024

A348377 Number of non-alternating compositions of n, excluding twins (x,x).

Original entry on oeis.org

0, 0, 0, 1, 3, 9, 19, 45, 98, 208, 436, 906, 1861, 3803, 7731, 15659, 31628, 63747, 128257, 257722, 517338, 1037652, 2079983, 4167325, 8346203, 16710572, 33449694, 66944254, 133959020, 268028868, 536231902, 1072737537, 2145905284, 4292486690, 8586035992
Offset: 0

Views

Author

Gus Wiseman, Oct 26 2021

Keywords

Comments

First differs from A348382 at a(6) = 19, A348382(6) = 17. The two non-alternating non-twin compositions of 6 that are not an anti-run are (1,2,3) and (3,2,1).
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(3) = 1 through a(6) = 19 compositions:
  (1,1,1)  (1,1,2)    (1,1,3)      (1,1,4)
           (2,1,1)    (1,2,2)      (1,2,3)
           (1,1,1,1)  (2,2,1)      (2,2,2)
                      (3,1,1)      (3,2,1)
                      (1,1,1,2)    (4,1,1)
                      (1,1,2,1)    (1,1,1,3)
                      (1,2,1,1)    (1,1,2,2)
                      (2,1,1,1)    (1,1,3,1)
                      (1,1,1,1,1)  (1,2,2,1)
                                   (1,3,1,1)
                                   (2,1,1,2)
                                   (2,2,1,1)
                                   (3,1,1,1)
                                   (1,1,1,1,2)
                                   (1,1,1,2,1)
                                   (1,1,2,1,1)
                                   (1,2,1,1,1)
                                   (2,1,1,1,1)
                                   (1,1,1,1,1,1)
		

Crossrefs

The version for patterns is A000670(n) - A344605(n).
Non-twin compositions are counted by A051049.
The complement is counted by A344604.
An unordered version is A344654.
The complement is ranked by A345167 \/ A007582.
These compositions are ranked by A345168 \ A007582.
Including twins gives A345192, complement A025047.
The version for factorizations is A347706, or A348380 with twins.
The non-anti-run case is A348382.
A001250 counts alternating permutations.
A011782 counts compositions, strict A032020.
A106356 counts compositions by number of maximal anti-runs.
A114901 counts compositions where each part is adjacent to an equal part.
A261983 counts non-anti-run compositions, complement A003242.
A325535 counts inseparable partitions, ranked by A335448.
A344614 counts compositions avoiding (1,2,3) and (3,2,1) adjacent.
A345165 = partitions with no alternating permutations, ranked by A345171.
A345170 = partitions with an alternating permutation, ranked by A345172.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],MatchQ[#,{_,x_,y_,z_,_}/;x<=y<=z||x>=y>=z]&]],{n,0,15}]

Formula

For n > 0, a(n) = A345192(n) - 1 if n is even; otherwise A345192(n).

Extensions

a(26) onwards from Andrew Howroyd, Jan 31 2024

A348609 Numbers with a separable factorization without an alternating permutation.

Original entry on oeis.org

216, 270, 324, 378, 432, 486, 540, 594, 640, 648, 702, 756, 768, 810, 864, 896, 918, 960, 972, 1024, 1026, 1080, 1134, 1152, 1188, 1242, 1280, 1296, 1344, 1350, 1404, 1408, 1458, 1500, 1512, 1536, 1566, 1620, 1664, 1674, 1728, 1750, 1782, 1792, 1836, 1890
Offset: 1

Views

Author

Gus Wiseman, Oct 30 2021

Keywords

Comments

A factorization of n is a weakly increasing sequence of positive integers > 1 with product n.
A multiset is separable if it has a permutation that is an anti-run, meaning there are no adjacent equal parts. Alternatively, a multiset is separable if its greatest multiplicity is greater than the sum of the remaining multiplicities plus one.
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.
Note that 216 has separable prime factorization (2*2*2*3*3*3) with an alternating permutation, but the separable factorization (2*3*3*3*4) is has no alternating permutation. See also A345173.

Examples

			The terms and their prime factorizations begin:
  216 = 2*2*2*3*3*3
  270 = 2*3*3*3*5
  324 = 2*2*3*3*3*3
  378 = 2*3*3*3*7
  432 = 2*2*2*2*3*3*3
  486 = 2*3*3*3*3*3
  540 = 2*2*3*3*3*5
  594 = 2*3*3*3*11
  640 = 2*2*2*2*2*2*2*5
  648 = 2*2*2*3*3*3*3
  702 = 2*3*3*3*13
  756 = 2*2*3*3*3*7
  768 = 2*2*2*2*2*2*2*2*3
  810 = 2*3*3*3*3*5
  864 = 2*2*2*2*2*3*3*3
		

Crossrefs

Partitions of this type are counted by A345166, ranked by A345173 (a superset).
Compositions of this type are counted by A345195, ranked by A345169.
A001055 counts factorizations, strict A045778, ordered A074206.
A001250 counts alternating permutations, complement A348615.
A025047 counts alternating compositions, complement A345192, ranked by A345167.
A335434 counts separable factorizations, with twins A348383, complement A333487.
A339846 counts even-length factorizations.
A339890 counts odd-length factorizations.
A345165 counts partitions w/o an alternating permutation, complement A345170.
A347438 counts factorizations with alternating product 1, additive A119620.
A348379 counts factorizations w/ an alternating permutation, complement A348380.
A348610 counts alternating ordered factorizations, complement A348613.

Programs

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

A348381 Number of inseparable factorizations of n that are not a twin (x*x).

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 30 2021

Keywords

Comments

First differs from A347706 at a(216) = 3, A347706(216) = 4.
A factorization of n is a weakly increasing sequence of positive integers > 1 with product n.
A multiset is inseparable if it has no permutation that is an anti-run, meaning there are always adjacent equal parts. Alternatively, a multiset is inseparable if its maximal multiplicity is at most one plus the sum of its remaining multiplicities.

Examples

			The a(n) factorizations for n = 96, 192, 384, 576:
  2*2*2*12      3*4*4*4         4*4*4*6           4*4*4*9
  2*2*2*2*6     2*2*2*24        2*2*2*48          2*2*2*72
  2*2*2*2*2*3   2*2*2*2*12      2*2*2*2*24        2*2*2*2*36
                2*2*2*2*2*6     2*2*2*2*3*8       2*2*2*2*4*9
                2*2*2*2*3*4     2*2*2*2*4*6       2*2*2*2*6*6
                2*2*2*2*2*2*3   2*2*2*2*2*12      2*2*2*2*2*18
                                2*2*2*2*2*2*6     2*2*2*2*3*12
                                2*2*2*2*2*3*4     2*2*2*2*2*2*9
                                2*2*2*2*2*2*2*3   2*2*2*2*2*3*6
                                                  2*2*2*2*2*2*3*3
		

Crossrefs

Positions of nonzero terms are A046099.
Partitions not of this type are counted by A325534 - A000035.
Partitions of this type are counted by A325535 - A000035.
Allowing twins gives A333487.
The case without an alternating permutation is A347706, with twins A348380.
The complement is counted by A348383, without twins A335434.
A001055 counts factorizations, strict A045778, ordered A074206.
A001250 counts alternating permutations of sets.
A008480 counts permutations of prime indices, strict A335489.
A025047 counts alternating or wiggly compositions.
A335452 counts anti-run permutations of prime indices, complement A336107.
A339846 counts even-length factorizations.
A339890 counts odd-length factorizations.
A344654 counts non-twin partitions without an alternating permutation.
A348382 counts non-anti-run compositions that are not a twin.
A348611 counts anti-run 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],!MatchQ[#,{x_,x_}]&&Select[Permutations[#],!MatchQ[#,{_,x_,x_,_}]&]=={}&]],{n,100}]

Formula

a(n > 1) = A333487(n) - A010052(n).
a(2^n) = A325535(n) - 1 for odd n, otherwise A325535(n).

A348383 Number of factorizations of n that are either separable (have an anti-run permutation) or are a twin (x*x).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 4, 1, 2, 2, 4, 1, 4, 1, 4, 2, 2, 1, 6, 2, 2, 2, 4, 1, 5, 1, 5, 2, 2, 2, 9, 1, 2, 2, 6, 1, 5, 1, 4, 4, 2, 1, 10, 2, 4, 2, 4, 1, 6, 2, 6, 2, 2, 1, 11, 1, 2, 4, 7, 2, 5, 1, 4, 2, 5, 1, 15, 1, 2, 4, 4, 2, 5, 1, 10, 4, 2, 1, 11, 2
Offset: 1

Views

Author

Gus Wiseman, Oct 30 2021

Keywords

Comments

First differs from A347050 at a(216) = 28, A347050(216) = 27.
A factorization of n is a weakly increasing sequence of positive integers > 1 with product n.
A multiset is separable if it has a permutation that is an anti-run, meaning there are no adjacent equal parts. Alternatively, a multiset is separable if its greatest multiplicity is greater than the sum of the remaining multiplicities plus one.

Examples

			The a(216) = 28 factorizations:
  (2*2*2*3*3*3)  (2*2*2*3*9)  (2*2*6*9)   (3*8*9)   (3*72)   (216)
                 (2*2*3*3*6)  (2*3*4*9)   (4*6*9)   (4*54)
                 (2*3*3*3*4)  (2*3*6*6)   (2*2*54)  (6*36)
                              (3*3*4*6)   (2*3*36)  (8*27)
                              (2*2*3*18)  (2*4*27)  (9*24)
                              (2*3*3*12)  (2*6*18)  (12*18)
                                          (2*9*12)  (2*108)
                                          (3*3*24)
                                          (3*4*18)
                                          (3*6*12)
The a(270) = 20 factorizations:
  (2*3*3*3*5)  (2*3*5*9)   (5*6*9)   (3*90)   (270)
               (3*3*5*6)   (2*3*45)  (5*54)
               (2*3*3*15)  (2*5*27)  (6*45)
                           (2*9*15)  (9*30)
                           (3*3*30)  (10*27)
                           (3*5*18)  (15*18)
                           (3*6*15)  (2*135)
                           (3*9*10)
		

Crossrefs

Positions of 1's are 1 and A000040.
Not requiring separability gives A010052 for n > 1.
Positions of 2's are A323644.
Partitions of this type are counted by A325534(n) + A000035(n + 1).
Partitions of this type are ranked by A335433 \/ A001248.
Partitions not of this type are counted by A325535(n) - A000035(n + 1).
Partitions not of this type are ranked by A345193 = A335448 \ A001248.
Not allowing twins gives A335434, complement A333487,
The case with an alternating permutation is A347050, no twins A348379.
The case without an alternating permutation is A347706, no twins A348380.
The complement is counted by A348381.
A001055 counts factorizations, strict A045778, ordered A074206.
A001250 counts alternating permutations.
A003242 counts anti-run compositions, ranked by A333489.
A025047 counts alternating or wiggly compositions.
A335452 counts anti-run permutations of prime indices, complement A336107.
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]]}]];
    sepQ[m_]:=Select[Permutations[m],!MatchQ[#,{_,x_,x_,_}]&]!={};
    Table[Length[Select[facs[n],MatchQ[#,{x_,x_}]||sepQ[#]&]],{n,100}]

Formula

a(n > 1) = A335434(n) + A010052(n), where A010052(n) = 1 if n is a perfect square, otherwise 0.

A348616 Number of ordered factorizations of n with adjacent equal factors.

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, 6, 1, 0, 1, 2, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0, 6, 0, 0, 0, 2, 2, 0, 0, 19, 1, 2, 0, 2, 0, 6, 0, 6, 0, 0, 0, 8, 0, 0, 2, 18, 0, 0, 0, 2, 0, 0, 0, 31, 0, 0, 2, 2, 0, 0, 0, 19, 4, 0, 0, 8, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Nov 08 2021

Keywords

Comments

First differs from A348613 at a(24) = 6, A348613(24) = 8.
An ordered factorization of n is a finite sequence of positive integers > 1 with product n.

Examples

			The a(n) ordered factorizations with at least one pair of adjacent equal factors for n = 12, 24, 36, 60:
   2*2*3    2*2*6      6*6        15*2*2
   3*2*2    6*2*2      2*2*9      2*2*15
            2*2*2*3    3*3*4      2*2*3*5
            2*2*3*2    4*3*3      2*2*5*3
            2*3*2*2    9*2*2      3*2*2*5
            3*2*2*2    2*2*3*3    3*5*2*2
                       2*3*3*2    5*2*2*3
                       3*2*2*3    5*3*2*2
                       3*3*2*2
See also examples in A348611.
		

Crossrefs

Positions of 0's are A005117.
Positions of 4's appear to be A030514.
Positions of 2's appear to be A054753.
Positions of 1's appear to be A168363.
The additive version (compositions) is A261983, complement A003242.
Factorizations with a permutation of this type are counted by A333487.
Factorizations without a permutation of this type are counted by A335434.
The complement is counted by A348611.
As compositions these are ranked by A348612, complement A333489.
Dominated by A348613 (non-alternating ordered factorizations).
A001055 counts factorizations, strict A045778, ordered A074206.
A335452 counts anti-run permutations of prime indices, complement A336107.
A339846 counts even-length factorizations.
A339890 counts odd-length factorizations.

Programs

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

Formula

a(n) = A074206(n) - A348611(n).
Showing 1-7 of 7 results.