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

A347463 Number of ordered factorizations of n with integer alternating product.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 07 2021

Keywords

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

Examples

			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
		

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.

Programs

  • 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}]
  • 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

Formula

a(n) = A347048(n) + A347049(n).

Extensions

Data section extended up to a(100) by Antti Karttunen, Jul 28 2024

A347049 Number of odd-length ordered factorizations of n with integer alternating product.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 4, 1, 3, 1, 3, 1, 1, 1, 5, 1, 1, 2, 3, 1, 1, 1, 7, 1, 1, 1, 11, 1, 1, 1, 5, 1, 1, 1, 3, 3, 1, 1, 14, 1, 3, 1, 3, 1, 5, 1, 5, 1, 1, 1, 7, 1, 1, 3, 15, 1, 1, 1, 3, 1, 1, 1, 24, 1, 1, 3, 3, 1, 1, 1, 14, 4, 1, 1, 7, 1, 1, 1, 5, 1, 7, 1, 3, 1, 1, 1, 24, 1, 3, 3, 11
Offset: 1

Views

Author

Gus Wiseman, Oct 10 2021

Keywords

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

Examples

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

Crossrefs

Positions of 2's appear to be A030078.
Positions of 3's appear to be A054753.
Positions of 1's appear to be A167207.
Allowing non-integer alternating product gives A174726, unordered A339890.
The even-length version is A347048.
The unordered version is A347441, with same reverse version.
The case of partitions is A347444, ranked by A347453.
Allowing any length gives A347463.
A001055 counts factorizations (strict A045778, ordered A074206).
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A119620 counts partitions with alternating product 1, ranked by A028982.
A339846 counts even-length factorizations, ordered A174725.
A347050 = factorizations with alternating permutation, complement A347706.
A347437 = factorizations with integer alternating product, reverse A347442.
A347438 = factorizations with alternating product 1, on squares A273013.
A347439 = factorizations with integer reciprocal alternating product.
A347446 = partitions with integer alternating product, reverse A347445.
A347457 lists Heinz numbers of partitions with integer alternating product.
A347460 counts possible alternating products of factorizations.
A347708 counts possible alternating products of odd-length factorizations.

Programs

  • Mathematica
    ordfacs[n_]:=If[n<=1,{{}},Join@@Table[Prepend[#,d]&/@ordfacs[n/d],{d,Rest[Divisors[n]]}]];
    altprod[q_]:=Product[q[[i]]^(-1)^(i-1),{i,Length[q]}];
    Table[Length[Select[ordfacs[n],OddQ[Length[#]]&&IntegerQ[altprod[#]]&]],{n,100}]
  • PARI
    A347049(n, m=n, ap=1, e=0) = if(1==n,(e%2) && 1==denominator(ap), sumdiv(n, d, if(d>1, A347049(n/d, d, ap * d^((-1)^e), 1-e)))); \\ Antti Karttunen, Jul 28 2024

Formula

a(n) = A347463(n) - A347048(n).

Extensions

Data section extended up to a(100) by Antti Karttunen, Jul 28 2024
Showing 1-2 of 2 results.