login
Search: a339890 -id:a339890
     Sort: relevance | references | number | modified | created      Format: long | short | data
Number of factorizations of n with integer reverse-alternating product.
+10
29
1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 3, 1, 1, 1, 5, 1, 3, 1, 3, 1, 1, 1, 3, 2, 1, 3, 3, 1, 1, 1, 7, 1, 1, 1, 8, 1, 1, 1, 3, 1, 1, 1, 3, 3, 1, 1, 8, 2, 3, 1, 3, 1, 4, 1, 3, 1, 1, 1, 3, 1, 1, 3, 11, 1, 1, 1, 3, 1, 1, 1, 11, 1, 1, 3, 3, 1, 1, 1, 8, 5, 1, 1, 3, 1, 1, 1, 3, 1, 4, 1, 3, 1, 1, 1, 9, 1, 3, 3, 8, 1, 1, 1, 3, 1, 1, 1, 12
OFFSET
1,4
COMMENTS
A factorization of n is a weakly increasing sequence of positive integers > 1 with product n.
We define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)). The reverse-alternating product is the alternating product of the reversed sequence.
LINKS
FORMULA
a(2^n) = A000041(n).
EXAMPLE
The a(n) factorizations for n = 4, 8, 16, 32, 36, 54, 64:
(4) (8) (16) (32) (36) (54) (64)
(2*2) (2*4) (2*8) (4*8) (6*6) (3*18) (8*8)
(2*2*2) (4*4) (2*16) (2*18) (2*3*9) (2*32)
(2*2*4) (2*2*8) (3*12) (3*3*6) (4*16)
(2*2*2*2) (2*4*4) (2*2*9) (2*4*8)
(2*2*2*4) (2*3*6) (4*4*4)
(2*2*2*2*2) (3*3*4) (2*2*16)
(2*2*3*3) (2*2*2*8)
(2*2*4*4)
(2*2*2*2*4)
(2*2*2*2*2*2)
MATHEMATICA
facs[n_]:=If[n<=1, {{}}, Join@@Table[Map[Prepend[#, d]&, Select[facs[n/d], Min@@#>=d&]], {d, Rest[Divisors[n]]}]];
revaltprod[q_]:=Product[Reverse[q][[i]]^(-1)^(i-1), {i, Length[q]}];
Table[Length[Select[facs[n], IntegerQ@*revaltprod]], {n, 100}]
PROG
(PARI) A347442(n, m=n, ap=1, e=0) = if(1==n, 1==denominator(ap), sumdiv(n, d, if((d>1)&&(d<=m), A347442(n/d, d, ap * d^((-1)^e), 1-e)))); \\ Antti Karttunen, Oct 22 2023
CROSSREFS
The restriction to powers of 2 is A000041, reverse A344607.
Positions of 2's are A001248.
Positions of 1's are A005117.
Positions of non-1's are A013929.
Allowing any alternating product <= 1 gives A339846.
Allowing any alternating product > 1 gives A339890.
The non-reverse version is A347437.
The reciprocal version is A347438.
The even-length case is A347439.
Allowing any alternating product < 1 gives A347440.
The odd-length case is A347441, ranked by A347453.
The additive version is A347445, ranked by A347457.
The non-reverse additive version is A347446, ranked by A347454.
Allowing any alternating product >= 1 gives A347456.
The ordered version is A347463.
A038548 counts possible reverse-alternating products of factorizations.
A071321 gives the alternating sum of prime factors (reverse: A071322).
A236913 counts partitions of 2n with reverse-alternating sum <= 0.
A273013 counts ordered factorizations of n^2 with alternating product 1.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 08 2021
EXTENSIONS
Data section extended up to a(108) by Antti Karttunen, Oct 22 2023
STATUS
approved
Number of integer partitions of n with integer alternating product.
+10
28
1, 1, 2, 3, 5, 6, 10, 12, 18, 22, 31, 37, 54, 62, 84, 100, 134, 157, 207, 241, 314, 363, 463, 537, 685, 785, 985, 1138, 1410, 1616, 1996, 2286, 2801, 3201, 3885, 4434, 5363, 6098, 7323, 8329, 9954, 11293, 13430, 15214, 18022, 20383, 24017, 27141, 31893, 35960
OFFSET
0,3
COMMENTS
We define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)).
EXAMPLE
The a(1) = 1 through a(7) = 12 partitions:
(1) (2) (3) (4) (5) (6) (7)
(11) (21) (22) (41) (33) (61)
(111) (31) (221) (42) (322)
(211) (311) (51) (331)
(1111) (2111) (222) (421)
(11111) (411) (511)
(2211) (2221)
(3111) (4111)
(21111) (22111)
(111111) (31111)
(211111)
(1111111)
MATHEMATICA
altprod[q_]:=Product[q[[i]]^(-1)^(i-1), {i, Length[q]}];
Table[Length[Select[IntegerPartitions[n], IntegerQ[altprod[#]]&]], {n, 0, 30}]
CROSSREFS
Allowing any reverse-alternating product >= 1 gives A344607.
Allowing any alternating product <= 1 gives A119620, reverse A347443.
Allowing any reverse-alternating product < 1 gives A344608.
The multiplicative version (factorizations) is A347437, reverse A347442.
The odd-length case is A347444, ranked by A347453.
The reverse version is A347445, ranked by A347454.
Allowing any alternating product > 1 gives A347448, reverse A347449.
Ranked by A347457.
The even-length case is A347704.
A000041 counts partitions.
A027187 counts partitions of even length.
A027193 counts partitions of odd length.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A347461 counts possible alternating products of partitions.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 15 2021
STATUS
approved
Number of factorizations of n with alternating product >= 1.
+10
27
1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 2, 1, 1, 1, 3, 2, 1, 2, 2, 1, 2, 1, 4, 1, 1, 1, 6, 1, 1, 1, 3, 1, 2, 1, 2, 2, 1, 1, 6, 2, 2, 1, 2, 1, 3, 1, 3, 1, 1, 1, 5, 1, 1, 2, 8, 1, 2, 1, 2, 1, 2, 1, 8, 1, 1, 2, 2, 1, 2, 1, 6, 4, 1, 1, 5, 1, 1, 1
OFFSET
1,4
COMMENTS
We define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)).
A factorization of n is a weakly increasing sequence of positive integers > 1 with product n.
Also the number of factorizations of n with alternating sum >= 0.
FORMULA
a(n) = A347438(n) + A347440(n).
EXAMPLE
The a(n) factorizations for n = 4, 16, 24, 36, 60, 64, 96:
4 16 24 36 60 64 96
2*2 4*4 2*2*6 6*6 2*5*6 8*8 2*6*8
2*2*4 2*3*4 2*2*9 3*4*5 2*4*8 3*4*8
2*2*2*2 2*3*6 2*2*15 4*4*4 4*4*6
3*3*4 2*3*10 2*2*16 2*2*24
2*2*3*3 2*2*4*4 2*3*16
2*2*2*2*4 2*4*12
2*2*2*2*2*2 2*2*2*2*6
2*2*2*3*4
MATHEMATICA
facs[n_]:=If[n<=1, {{}}, Join@@Table[Map[Prepend[#, d]&, Select[facs[n/d], Min@@#>=d&]], {d, Rest[Divisors[n]]}]];
altprod[q_]:=Product[q[[i]]^(-1)^(i-1), {i, Length[q]}];
Table[Length[Select[facs[n], altprod[#]>=1&]], {n, 100}]
CROSSREFS
The case of partitions is A000041, reverse A344607.
The reverse version is A001055, strict A347705.
Positions of 3's appear to be A065036.
Positions of 1's are 1 and A167171.
The opposite version (<= instead of >=) is A339846.
The strict version (> instead of >=) is A339890, also the odd-length case.
Allowing any integer alternating product gives A347437.
The case of alternating product 1 is A347438, also the even-length case.
Allowing any integer reciprocal alternating product gives A347439.
The complement (< instead of >=) is A347440.
Allowing any integer reverse-alternating product gives A347442.
A038548 counts factorizations with a wiggly permutation.
A045778 counts strict factorizations.
A074206 counts ordered factorizations.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A119620 counts partitions with alternating product 1.
A347447 counts strict factorizations with alternating product > 1.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 09 2021
STATUS
approved
Number of factorizations of n with an alternating permutation.
+10
27
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,6
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}.
FORMULA
a(2^n) = A345170(n).
EXAMPLE
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)
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}]
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.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 28 2021
STATUS
approved
Number of ordered factorizations of n with integer alternating product.
+10
26
1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 4, 1, 1, 1, 7, 1, 4, 1, 4, 1, 1, 1, 6, 2, 1, 3, 4, 1, 1, 1, 11, 1, 1, 1, 18, 1, 1, 1, 6, 1, 1, 1, 4, 4, 1, 1, 20, 2, 4, 1, 4, 1, 6, 1, 6, 1, 1, 1, 8, 1, 1, 4, 26, 1, 1, 1, 4, 1, 1, 1, 35, 1, 1, 4, 4, 1, 1, 1, 20, 7, 1, 1, 8, 1, 1, 1, 6, 1, 8, 1, 4, 1, 1, 1, 32, 1, 4, 4, 18
OFFSET
1,4
COMMENTS
An ordered factorization of n is a sequence of positive integers > 1 with product n.
We define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)).
FORMULA
a(n) = A347048(n) + A347049(n).
EXAMPLE
The ordered factorizations for n = 4, 8, 12, 16, 24, 32, 36:
4 8 12 16 24 32 36
2*2 4*2 6*2 4*4 12*2 8*4 6*6
2*2*2 2*2*3 8*2 2*2*6 16*2 12*3
3*2*2 2*2*4 3*2*4 2*2*8 18*2
2*4*2 4*2*3 2*4*4 2*2*9
4*2*2 6*2*2 4*2*4 2*3*6
2*2*2*2 4*4*2 2*6*3
8*2*2 3*2*6
2*2*4*2 3*3*4
4*2*2*2 3*6*2
2*2*2*2*2 4*3*3
6*2*3
6*3*2
9*2*2
2*2*3*3
2*3*3*2
3*2*2*3
3*3*2*2
MATHEMATICA
facs[n_]:=If[n<=1, {{}}, Join@@Table[Map[Prepend[#, d]&, Select[facs[n/d], Min@@#>=d&]], {d, Rest[Divisors[n]]}]];
altprod[q_]:=Product[q[[i]]^(-1)^(i-1), {i, Length[q]}];
Table[Length[Select[Join@@Permutations/@facs[n], IntegerQ[altprod[#]]&]], {n, 100}]
PROG
(PARI) A347463(n, m=n, ap=1, e=0) = if(1==n, if(e%2, 1==denominator(ap), 1==numerator(ap)), sumdiv(n, d, if(d>1, A347463(n/d, d, ap * d^((-1)^e), 1-e)))); \\ Antti Karttunen, Jul 28 2024
CROSSREFS
Positions of 2's are A001248.
Positions of 1's are A005117.
The restriction to powers of 2 is A116406.
The even-length case is A347048
The odd-length case is A347049.
The unordered version is A347437, reciprocal A347439, reverse A347442.
The case of partitions is A347446, reverse A347445, ranked by A347457.
A001055 counts factorizations (strict A045778, ordered A074206).
A046099 counts factorizations with no alternating permutations.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A119620 counts partitions with alternating product 1, ranked by A028982.
A273013 counts ordered factorizations of n^2 with alternating product 1.
A339846 counts even-length factorizations, ordered A174725.
A339890 counts odd-length factorizations, ordered A174726.
A347438 counts factorizations with alternating product 1.
A347460 counts possible alternating products of factorizations.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 07 2021
EXTENSIONS
Data section extended up to a(100) by Antti Karttunen, Jul 28 2024
STATUS
approved
a(n) = (A074206(n) + A008683(n))/2.
+10
25
1, 0, 0, 1, 0, 2, 0, 2, 1, 2, 0, 4, 0, 2, 2, 4, 0, 4, 0, 4, 2, 2, 0, 10, 1, 2, 2, 4, 0, 6, 0, 8, 2, 2, 2, 13, 0, 2, 2, 10, 0, 6, 0, 4, 4, 2, 0, 24, 1, 4, 2, 4, 0, 10, 2, 10, 2, 2, 0, 22, 0, 2, 4, 16, 2, 6, 0, 4, 2, 6, 0, 38, 0, 2, 4, 4, 2
OFFSET
1,6
COMMENTS
From Mats Granvik, May 25 2017: (Start)
A074206(n) = A002033(n-1) = a(n) + A174726(n).
A008683(n) = a(n) - A174726(n).
Let m = size of matrix a matrix T, and let T be defined as follows:
T(n,k) = if m = 1 then 1 else if mod(n, k) = 0 then if and(n = k, n = m) then 0 else 1 else if and(n = 1, k = m) then 1 else 0
a(n) is then the number of permutation matrices with a positive contribution in the determinant of matrix T. The determinant of T is equal to the Möbius function A008683, see Mathematica program below for how to compute the determinant.
A174726 is the number of permutation matrices with a negative contribution in the determinant of matrix T.
(End)
From Gus Wiseman, Jan 04 2021: (Start)
Also the number of ordered factorizations of n into an even number of factors > 1. The non-ordered case is A339846. For example, the a(n) factorizations for n = 12, 24, 30, 32, 36 are:
(2*6) (3*8) (5*6) (4*8) (4*9)
(3*4) (4*6) (6*5) (8*4) (6*6)
(4*3) (6*4) (10*3) (16*2) (9*4)
(6*2) (8*3) (15*2) (2*16) (12*3)
(12*2) (2*15) (2*2*2*4) (18*2)
(2*12) (3*10) (2*2*4*2) (2*18)
(2*2*2*3) (2*4*2*2) (3*12)
(2*2*3*2) (4*2*2*2) (2*2*3*3)
(2*3*2*2) (2*3*2*3)
(3*2*2*2) (2*3*3*2)
(3*2*2*3)
(3*2*3*2)
(3*3*2*2)
(End)
LINKS
FORMULA
a(n) = (Mobius transform of a(n)) + (Mobius transform of A174726). - Mats Granvik, Apr 04 2010
From Mats Granvik, May 25 2017: (Start)
This sequence is the Moebius transform of A074206.
a(n) = (A074206(n) + A008683(n))/2.
(End)
G.f. A(x) satisfies: A(x) = x + Sum_{i>=2} Sum_{j>=2} A(x^(i*j)). - Ilya Gutkovskiy, May 11 2019
MATHEMATICA
(* From Mats Granvik, May 25 2017: (Start) *)
Clear[t, nn]; nn = 77; t[1, 1] = 1; t[n_, k_] := t[n, k] = If[k == 1, Sum[t[n, k + i], {i, 1, n - 1}], If[Mod[n, k] == 0, t[n/k, 1], 0], 0]; Monitor[Table[Sum[If[Mod[n, k] == 0, MoebiusMu[k]*t[n/k, 1], 0], {k, 1, 77}], {n, 1, nn}], n]
(* The Möbius function as a determinant *) Table[Det[Table[Table[If[m == 1, 1, If[Mod[n, k] == 0, If[And[n == k, n == m], 0, 1], If[And[n == 1, k == m], 1, 0]]], {k, 1, m}], {n, 1, m}]], {m, 1, 42}]
(* (End) *)
ordfacs[n_]:=If[n<=1, {{}}, Join@@Table[(Prepend[#1, d]&)/@ordfacs[n/d], {d, Rest[Divisors[n]]}]];
Table[Length[Select[ordfacs[n], EvenQ@*Length]], {n, 100}] (* Gus Wiseman, Jan 04 2021 *)
CROSSREFS
The odd version is A174726.
The unordered version is A339846.
A001055 counts factorizations, with strict case A045778.
A058696 counts partitions of even numbers, ranked by A300061.
A074206 counts ordered factorizations, with strict case A254578.
A251683 counts ordered factorizations by product and length.
Other cases of even length:
- A024430 counts set partitions of even length.
- A027187 counts partitions of even length.
- A034008 counts compositions of even length.
- A052841 counts ordered set partitions of even length.
- A067661 counts strict partitions of even length.
- A332305 counts strict compositions of even length
KEYWORD
nonn
AUTHOR
Mats Granvik, Mar 28 2010
EXTENSIONS
References to A002033(n-1) changed to A074206(n) by Antti Karttunen, Nov 23 2024
STATUS
approved
Number of alternating ordered factorizations of n.
+10
25
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,6
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).
EXAMPLE
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
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}]
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.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 05 2021
STATUS
approved
Number of factorizations of n into factors > 1 with length and greatest factor equal.
+10
24
0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
OFFSET
1,192
COMMENTS
I call these alt-balanced factorizations. Balanced factorizations are A340653. - Gus Wiseman, Jan 20 2021
LINKS
EXAMPLE
The alt-balanced factorizations for n = 192, 1728, 3456, 9216:
3*4*4*4 2*2*2*6*6*6 2*2*4*6*6*6 4*4*4*4*6*6
2*2*2*2*2*6 2*2*3*4*6*6 2*3*4*4*6*6 2*2*2*2*2*6*6*8
2*3*3*4*4*6 3*3*4*4*4*6 2*2*2*2*3*3*8*8
2*2*2*2*3*3*3*8 2*2*2*2*3*4*6*8
2*2*2*2*2*2*2*3*9 2*2*2*3*3*4*4*8
2*2*2*2*2*2*2*8*9
2*2*2*2*2*2*4*4*9
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], Length[#]==Max[#]&]], {n, 100}]
PROG
(PARI) A340599(n, m=n, e=0, mf=1) = if(1==n, mf==e, sumdiv(n, d, if((d>1)&&(d<=m), A340599(n/d, d, 1+e, max(d, mf))))); \\ Antti Karttunen, Jun 19 2024
CROSSREFS
The co-balanced version is A340596.
Positions of nonzero terms are A340597.
The case of powers of two is A340611.
Taking maximum Omega instead of maximum factor gives A340653.
The cross-balanced version is A340654.
The twice-balanced version is A340655.
A001055 counts factorizations.
A045778 counts strict factorizations.
A316439 counts factorizations by product and length.
Other balance-related sequences:
- A010054 counts balanced strict partitions.
- A047993 counts balanced partitions.
- A098124 counts balanced compositions.
- A106529 lists Heinz numbers of balanced partitions.
- A340598 counts balanced set partitions.
- A340600 counts unlabeled balanced multiset partitions.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jan 20 2021
EXTENSIONS
Data section extended up to a(120) and the secondary offset added by Antti Karttunen, Jun 19 2024
STATUS
approved
Number of factorizations of n that are not a twin (x*x) nor have an alternating permutation.
+10
24
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,32
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.
FORMULA
a(2^n) = A344654(n).
EXAMPLE
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
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}]
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.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 28 2021
STATUS
approved
Number of non-alternating ordered factorizations of n.
+10
24
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,12
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.
EXAMPLE
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
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}]
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.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 03 2021
STATUS
approved

Search completed in 0.058 seconds