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 11-20 of 28 results. Next

A348380 Number of factorizations of n without an alternating permutation. Includes all twins (x*x).

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Oct 28 2021

Keywords

Comments

First differs from A333487 at a(216) = 4, A333487(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 {1..n}.

Examples

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

Crossrefs

The inseparable case is A333487, complement A335434, without twins A348381.
Non-twin partitions of this type are counted by A344654, ranked by A344653.
Twins and partitions not of this type are counted by A344740, ranked by A344742.
Partitions of this type are counted by A345165, ranked by A345171.
Partitions not of this type are counted by A345170, ranked by A345172.
The case without twins is A347706.
The complement is counted by A348379, with twins A347050.
Numbers with a factorization of this type are A348609.
An ordered version is A348613, complement A348610.
A001055 counts factorizations, strict A045778, ordered A074206.
A001250 counts alternating permutations.
A025047 counts alternating or wiggly compositions, ranked by A345167.
A325535 counts inseparable partitions, ranked by A335448.
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) = A345165(n).

A273013 Number of different arrangements of nonnegative integers on a pair of n-sided dice such that the dice can add to any integer from 0 to n^2-1.

Original entry on oeis.org

1, 1, 1, 3, 1, 7, 1, 10, 3, 7, 1, 42, 1, 7, 7, 35, 1, 42, 1, 42, 7, 7, 1, 230, 3, 7, 10, 42, 1, 115, 1, 126, 7, 7, 7, 393, 1, 7, 7, 230, 1, 115, 1, 42, 42, 7, 1, 1190, 3, 42, 7, 42, 1, 230, 7, 230, 7, 7, 1, 1158, 1, 7, 42, 462, 7, 115, 1, 42, 7, 115, 1, 3030
Offset: 1

Views

Author

Elliott Line, May 13 2016

Keywords

Comments

The set of b values (see formula), and therefore also a(n), depends only on the prime signature of n. So, for example, a(24) will be identical to a(n) of any other n which is also of the form p_1^3*p_2, (e.g., 40, 54, 56).
The value of b_1 will always be 1. When n is prime, the only nonzero b will be b_1, so therefore a(n) will be 1.
In any arrangement, both dice will have a 0, and one will have a 1 (here called the lead die). To determine any one of the actual arrangements to numbers on the dice, select one of the permutations of divisors (for the lead die), then select another permutation that is either the same length as that of the lead die, or one less. For example, if n = 12, we might select 2*3*2 for the lead die, and 3*4 for the second die. These numbers effectively tell you when to "switch track" when numbering the dice, and will uniquely result in the numbering: (0,1,6,7,12,13,72,73,78,79,84,85; 0,2,4,18,20,22,36,38,40,54,56,58).
a(n) is the number of (unordered) pairs of polynomials c(x) = x^c_1 + x^c_2 + ... + x^c_n, d(x) = x^d_1 + x^d_2 + ... + x^d_n with nonnegative integer exponents such that c(x)*d(x) = (x^(n^2)-1)/(x-1). - Alois P. Heinz, May 13 2016
a(n) is also the number of principal reversible squares of order n. - S. Harry White, May 19 2018
From Gus Wiseman, Oct 29 2021: (Start)
Also the number of ordered factorizations of n^2 with alternating product 1. This follows from the author's formula. Taking n instead of n^2 gives a(sqrt(n)) if n is a perfect square, otherwise 0. Here, an ordered factorization of n is a sequence of positive integers > 1 with product n, and the alternating product of a sequence (y_1,...,y_k) is Product_i y_i^((-1)^(i-1)). For example, the a(1) = 1 through a(9) = 3 factorizations are:
() (22) (33) (44) (55) (66) (77) (88) (99)
(242) (263) (284) (393)
(2222) (362) (482) (3333)
(2233) (2244)
(2332) (2442)
(3223) (4224)
(3322) (4422)
(22242)
(24222)
(222222)
The even-length case is A347464.
(End)

Examples

			When n = 4, a(n) = 3; the three arrangements are (0,1,2,3; 0,4,8,12), (0,1,4,5; 0,2,8,10), (0,1,8,9; 0,2,4,6).
When n = 5, a(n) = 1; the sole arrangement is (0,1,2,3,4; 0,5,10,15,20).
		

Crossrefs

Positions of 1's are 1 and A000040.
A000290 lists squares, complement A000037.
A001055 counts factorizations, ordered A074206.
A119620 counts partitions with alternating product 1, ranked by A028982.
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.
A347463 counts ordered factorizations with integer alternating product.
A347466 counts factorizations of n^2.

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^2], altprod[#] == 1&]],{n, 30}]
    (* Gus Wiseman, Oct 29 2021 *)
    (* or *)
    ofc[n_,k_] := If[k > PrimeOmega[n], 0, If[k == 0 && n == 1, 1, Sum[ofc[n/d, k-1],{d, Rest[Divisors[n]]}]]];
    Table[If[n == 1, 1, Sum[ofc[n, x]^2 + ofc[n, x]*ofc[n, x+1], {x, n}]],{n, 30}]
    (* Gus Wiseman, Oct 29 2021, based on author's formula *)
  • PARI
    A273013aux(n, k=0, t=1) = if(1==n, (1==t), my(s=0); fordiv(n, d, if((d>1), s += A273013aux(n/d, 1-k, t*(d^((-1)^k))))); (s));
    A273013(n) = A273013aux(n^2); \\ Antti Karttunen, Oct 30 2021
    
  • SageMath
    @cached_function
    def r(m,n):
        if n==1:
            return(1)
        divList = divisors(m)[:-1]
        return(sum(r(n,d) for d in divList))
    def A273013(n):
        return(r(n,n)) # William P. Orrick, Feb 19 2023

Formula

a(n) = b_1^2 + b_2^2 + b_3^2 + ... + b_1*b_2 + b_2*b_3 + b_3*b_4 + ..., where b_k is the number of different permutations of k divisors of n to achieve a product of n. For example, for n=24, b_3 = 9 (6 permutations of 2*3*4 and 3 permutations of 2*2*6).
a(n) = r(n,n) where r(m,1) = 1 and r(m,n) = Sum_{d|m,dWilliam P. Orrick, Feb 19 2023

A347445 Number of integer partitions of n with integer reverse-alternating product.

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 7, 8, 12, 14, 20, 24, 32, 40, 50, 62, 77, 99, 115, 151, 170, 224, 251, 331, 360, 481, 517, 690, 728, 980, 1020, 1379, 1420, 1918, 1962, 2643, 2677, 3630, 3651, 4920, 4926, 6659, 6625, 8931, 8853, 11905, 11781, 15805, 15562, 20872, 20518
Offset: 0

Views

Author

Gus Wiseman, Sep 14 2021

Keywords

Comments

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.

Examples

			The a(1) = 1 through a(8) = 12 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (111)  (22)    (221)    (33)      (322)      (44)
                    (211)   (311)    (222)     (331)      (332)
                    (1111)  (11111)  (411)     (421)      (422)
                                     (2211)    (511)      (611)
                                     (21111)   (22111)    (2222)
                                     (111111)  (31111)    (3311)
                                               (1111111)  (22211)
                                                          (41111)
                                                          (221111)
                                                          (2111111)
                                                          (11111111)
		

Crossrefs

Allowing any reverse-alternating product >= 1 gives A344607.
Allowing any reverse-alternating product < 1 gives A344608.
The multiplicative version is A347442, unreversed A347437.
Allowing any reverse-alternating product <= 1 gives A347443.
Restricting to odd length gives A347444, ranked by A347453.
The unreversed version is A347446, ranked by A347457.
Allowing any reverse-alternating product > 1 gives A347449.
Ranked by A347454.
A000041 counts partitions, with multiplicative version A001055.
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.
A339890 counts factorizations with alternating product > 1, reverse A347705.
A347462 counts possible reverse-alternating products of partitions.

Programs

  • Mathematica
    revaltprod[q_]:=Product[Reverse[q][[i]]^(-1)^(i-1),{i,Length[q]}];
    Table[Length[Select[IntegerPartitions[n],IntegerQ[revaltprod[#]]&]],{n,0,30}]

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

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 5, 1, 2, 1, 2, 1, 3, 1, 2, 1, 1, 1, 2, 1, 1, 2, 5, 1, 1, 1, 2, 1, 1, 1, 6, 1, 1, 2, 2, 1, 1, 1, 5, 2, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 1, 1, 1, 6, 1, 2, 2, 4, 1, 1, 1, 2, 1, 1, 1, 7
Offset: 1

Views

Author

Gus Wiseman, Sep 07 2021

Keywords

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

Examples

			The a(n) factorizations for n = 2, 8, 32, 48, 54, 72, 108:
  2   8       32          48          54      72          108
      2*2*2   2*2*8       2*4*6       2*3*9   2*6*6       2*6*9
              2*4*4       3*4*4       3*3*6   3*3*8       3*6*6
              2*2*2*2*2   2*2*12              2*2*18      2*2*27
                          2*2*2*2*3           2*3*12      2*3*18
                                              2*2*2*3*3   3*3*12
                                                          2*2*3*3*3
		

Crossrefs

The restriction to powers of 2 is A027193.
Positions of 1's are A167207 = A005117 \/ A001248.
Allowing any alternating product gives A339890.
Allowing even-length factorizations gives A347437.
The even-length instead of odd-length version is A347438.
The additive version is A347444, ranked by A347453.
A038548 counts possible reverse-alternating products of factorizations.
A273013 counts ordered factorizations of n^2 with alternating product 1.
A339846 counts even-length factorizations.
A347439 counts factorizations with integer reciprocal alternating product.
A347440 counts factorizations with alternating product < 1.
A347442 counts factorizations with integer reverse-alternating product.
A347456 counts factorizations with alternating product >= 1.
A347463 counts ordered factorizations with integer alternating product.

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[facs[n],OddQ[Length[#]]&&IntegerQ[altprod[#]]&]],{n,100}]
  • PARI
    A347441(n, m=n, ap=1, e=0) = if(1==n, (e%2)&&1==denominator(ap), sumdiv(n, d, if((d>1)&&(d<=m), A347441(n/d, d, ap * d^((-1)^e), 1-e)))); \\ Antti Karttunen, Oct 22 2023

Formula

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

Extensions

Data section extended up to a(108) by Antti Karttunen, Oct 22 2023

A347454 Numbers whose multiset of prime indices has integer alternating product.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 16, 17, 18, 19, 20, 23, 25, 27, 28, 29, 31, 32, 36, 37, 41, 42, 43, 44, 45, 47, 48, 49, 50, 52, 53, 59, 61, 63, 64, 67, 68, 71, 72, 73, 75, 76, 78, 79, 80, 81, 83, 89, 92, 97, 98, 99, 100, 101, 103, 107, 108, 109, 112, 113
Offset: 1

Views

Author

Gus Wiseman, Sep 26 2021

Keywords

Comments

First differs from A265640 in having 42.
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.
We define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)).
Also Heinz numbers of partitions with integer reverse-alternating product, where the Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			The terms and their prime indices begin:
      1: {}            20: {1,1,3}         47: {15}
      2: {1}           23: {9}             48: {1,1,1,1,2}
      3: {2}           25: {3,3}           49: {4,4}
      4: {1,1}         27: {2,2,2}         50: {1,3,3}
      5: {3}           28: {1,1,4}         52: {1,1,6}
      7: {4}           29: {10}            53: {16}
      8: {1,1,1}       31: {11}            59: {17}
      9: {2,2}         32: {1,1,1,1,1}     61: {18}
     11: {5}           36: {1,1,2,2}       63: {2,2,4}
     12: {1,1,2}       37: {12}            64: {1,1,1,1,1,1}
     13: {6}           41: {13}            67: {19}
     16: {1,1,1,1}     42: {1,2,4}         68: {1,1,7}
     17: {7}           43: {14}            71: {20}
     18: {1,2,2}       44: {1,1,5}         72: {1,1,1,2,2}
     19: {8}           45: {2,2,3}         73: {21}
		

Crossrefs

The even-length case is A000290.
The additive version is A026424.
Allowing any alternating product < 1 gives A119899, strict A028260.
Allowing any alternating product >= 1 gives A344609, multiplicative A347456.
Factorizations of this type are counted by A347437.
These partitions are counted by A347445, reverse A347446.
Allowing any alternating product <= 1 gives A347450.
The reciprocal version is A347451.
The odd-length case is A347453.
The version for reversed prime indices is A347457, complement A347455.
Allowing any alternating product > 1 gives A347465, reverse A028983.
A056239 adds up prime indices, row sums of A112798.
A316524 gives the alternating sum of prime indices (reverse: A344616).
A335433 lists numbers whose prime indices are separable, complement A335448.
A344606 counts alternating permutations of prime indices.
A347461 counts possible alternating products of partitions.
A347462 counts possible reverse-alternating products of partitions.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    altprod[q_]:=Product[q[[i]]^(-1)^(i-1),{i,Length[q]}];
    Select[Range[100],IntegerQ[altprod[primeMS[#]]]&]

A347444 Number of odd-length integer partitions of n with integer alternating product.

Original entry on oeis.org

0, 1, 1, 2, 2, 4, 4, 8, 7, 14, 13, 24, 21, 40, 35, 62, 55, 99, 85, 151, 128, 224, 195, 331, 283, 481, 416, 690, 593, 980, 844, 1379, 1189, 1918, 1665, 2643, 2292, 3630, 3161, 4920, 4299, 6659, 5833, 8931, 7851, 11905, 10526, 15805, 13987, 20872, 18560, 27398
Offset: 0

Views

Author

Gus Wiseman, Sep 14 2021

Keywords

Comments

We define the alternating product of a sequence (y_1, ... ,y_k) to be the Product_i y_i^((-1)^(i-1)).
The reverse version (integer reverse-alternating product) is the same.

Examples

			The a(1) = 1 through a(9) = 14 partitions:
  (1)  (2)  (3)    (4)    (5)      (6)      (7)        (8)        (9)
            (111)  (211)  (221)    (222)    (322)      (332)      (333)
                          (311)    (411)    (331)      (422)      (441)
                          (11111)  (21111)  (421)      (611)      (522)
                                            (511)      (22211)    (621)
                                            (22111)    (41111)    (711)
                                            (31111)    (2111111)  (22221)
                                            (1111111)             (32211)
                                                                  (33111)
                                                                  (42111)
                                                                  (51111)
                                                                  (2211111)
                                                                  (3111111)
                                                                  (111111111)
		

Crossrefs

The reciprocal version is A035363.
Allowing any alternating product gives A027193.
The multiplicative version (factorizations) is A347441.
Allowing any length gives A347446, reverse A347445.
Allowing any length and alternating product > 1 gives A347448.
Allowing any reverse-alternating product > 1 gives A347449.
Ranked by A347453.
The even-length instead of odd-length version is A347704.
A000041 counts partitions.
A000302 counts odd-length compositions, ranked by A053738.
A025047 counts wiggly compositions.
A026424 lists numbers with odd bigomega.
A027187 counts partitions of even length, strict A067661.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A119620 counts partitions with alternating product 1, ranked by A028982.
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A339890 counts odd-length factorizations.
A347437 counts factorizations with integer alternating product.
A347461 counts possible alternating products of partitions.

Programs

  • Mathematica
    altprod[q_]:=Product[q[[i]]^(-1)^(i-1),{i,Length[q]}];
    Table[Length[Select[IntegerPartitions[n],OddQ[Length[#]]&&IntegerQ[altprod[#]]&]],{n,0,30}]

A347451 Numbers whose multiset of prime indices has integer reciprocal alternating product.

Original entry on oeis.org

1, 2, 4, 6, 8, 9, 10, 14, 16, 18, 21, 22, 24, 25, 26, 32, 34, 36, 38, 39, 40, 46, 49, 50, 54, 56, 57, 58, 62, 64, 65, 72, 74, 81, 82, 84, 86, 87, 88, 90, 94, 96, 98, 100, 104, 106, 111, 115, 118, 121, 122, 126, 128, 129, 133, 134, 136, 142, 144, 146, 150, 152
Offset: 1

Views

Author

Gus Wiseman, Sep 24 2021

Keywords

Comments

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.
We define the reciprocal alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^i).
Also Heinz numbers integer partitions with integer reverse-reciprocal alternating product, where the Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			The terms and their prime indices begin:
      1: {}            32: {1,1,1,1,1}       65: {3,6}
      2: {1}           34: {1,7}             72: {1,1,1,2,2}
      4: {1,1}         36: {1,1,2,2}         74: {1,12}
      6: {1,2}         38: {1,8}             81: {2,2,2,2}
      8: {1,1,1}       39: {2,6}             82: {1,13}
      9: {2,2}         40: {1,1,1,3}         84: {1,1,2,4}
     10: {1,3}         46: {1,9}             86: {1,14}
     14: {1,4}         49: {4,4}             87: {2,10}
     16: {1,1,1,1}     50: {1,3,3}           88: {1,1,1,5}
     18: {1,2,2}       54: {1,2,2,2}         90: {1,2,2,3}
     21: {2,4}         56: {1,1,1,4}         94: {1,15}
     22: {1,5}         57: {2,8}             96: {1,1,1,1,1,2}
     24: {1,1,1,2}     58: {1,10}            98: {1,4,4}
     25: {3,3}         62: {1,11}           100: {1,1,3,3}
     26: {1,6}         64: {1,1,1,1,1,1}    104: {1,1,1,6}
		

Crossrefs

The version for reversed prime indices is A028982, counted by A119620.
The additive version is A119899, strict A028260.
Allowing any alternating product >= 1 gives A344609.
Factorizations of this type are counted by A347439.
Allowing any alternating product <= 1 gives A347450.
The non-reciprocal version is A347454.
Allowing any alternating product > 1 gives A347465, reverse A028983.
A056239 adds up prime indices, row sums of A112798.
A316524 gives the alternating sum of prime indices (reverse: A344616).
A335433 lists numbers whose prime indices are separable, complement A335448.
A344606 counts alternating permutations of prime indices.
A347457 ranks partitions with integer alternating product.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    altprod[q_]:=Product[q[[i]]^(-1)^(i-1),{i,Length[q]}];
    Select[Range[100],IntegerQ[1/altprod[primeMS[#]]]&]

A347458 Number of factorizations of n^2 with integer alternating product.

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 2, 8, 4, 6, 2, 17, 2, 6, 6, 15, 2, 17, 2, 16, 6, 6, 2, 41, 4, 6, 8, 16, 2, 31, 2, 27, 6, 6, 6, 56, 2, 6, 6, 39, 2, 31, 2, 17, 17, 6, 2, 90, 4, 17, 6, 17, 2, 41, 6, 39, 6, 6, 2, 105, 2, 6, 17, 48, 6, 31, 2, 17, 6, 31, 2, 148, 2, 6, 17, 17, 6, 32, 2, 86, 15, 6, 2, 107, 6, 6, 6, 40, 2, 109, 6, 17
Offset: 1

Views

Author

Gus Wiseman, Sep 21 2021

Keywords

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.
The even-length case, the case of alternating product 1, and the case of alternating sum 0 are all counted by A001055.

Examples

			The a(2) = 2 through a(8) = 8 factorizations:
  4     9     16        25    36        49    64
  2*2   3*3   4*4       5*5   6*6       7*7   8*8
              2*2*4           2*2*9           2*4*8
              2*2*2*2         2*3*6           4*4*4
                              3*3*4           2*2*16
                              2*2*3*3         2*2*4*4
                                              2*2*2*2*4
                                              2*2*2*2*2*2
		

Crossrefs

Positions of 2's are A000040, squares A001248.
The restriction to powers of 2 is A344611.
This is the restriction to perfect squares of A347437.
The nonsquared even-length version is A347438.
The reciprocal version is A347459, non-squared A347439.
The additive version (partitions) is the even bisection of A347446.
The nonsquared ordered version is A347463.
The case of alternating product 1 in the ordered version is A347464.
Allowing any alternating product gives A347466.
A000290 lists squares, complement A000037.
A001055 counts factorizations.
A046099 counts factorizations with no alternating permutations.
A071321 gives the alternating sum of prime factors of n (reverse: A071322).
A273013 counts ordered factorizations of n^2 with alternating product 1.
A347460 counts possible alternating products of factorizations.
A339846 counts even-length factorizations.
A339890 counts odd-length factorizations.
A347457 ranks partitions with integer alternating product.
Apparently, A006881 gives the positions of 6's. - Antti Karttunen, Oct 22 2023

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[facs[n^2],IntegerQ[altprod[#]]&]],{n,100}]
  • PARI
    A347437(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)&&(d<=m), A347437(n/d, d, ap * d^((-1)^e), 1-e))));
    A347458(n) = A347437(n*n); \\ Antti Karttunen, Oct 22 2023

Formula

a(2^n) = A344611(n).
a(n) = A347437(n^2).

Extensions

Data section extended up to a(92) by Antti Karttunen, Oct 22 2023

A347459 Number of factorizations of n^2 with integer reciprocal alternating product.

Original entry on oeis.org

1, 1, 1, 3, 1, 4, 1, 6, 3, 4, 1, 11, 1, 4, 4, 12, 1, 11, 1, 12, 4, 4, 1, 28, 3, 4, 6, 12, 1, 19, 1, 22, 4, 4, 4, 38, 1, 4, 4, 29, 1, 21, 1, 12, 11, 4, 1, 65, 3, 11, 4, 12, 1, 29, 4, 29, 4, 4, 1, 71, 1, 4, 11, 40, 4, 22, 1, 12, 4, 18, 1, 107, 1, 4, 11, 12, 4, 22, 1, 66, 12, 4, 1, 76, 4, 4, 4, 30, 1, 71, 4, 12, 4, 4, 4, 141
Offset: 1

Views

Author

Gus Wiseman, Sep 22 2021

Keywords

Comments

We define the reciprocal alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^i).
A factorization of n is a weakly increasing sequence of positive integers > 1 with product n.
All such factorizations have even length.
Image appears to be 1, 3, 4, 6, 11, ... , missing some numbers such as 2, 5, 7, 8, 9, ...
The case of alternating product 1, the case of alternating sum 0, and the reverse version are all counted by A001055.

Examples

			The a(2) = 1 through a(10) = 4 factorizations:
    2*2  3*3  2*8      5*5  6*6      7*7  8*8          9*9      2*50
              4*4           2*18          2*32         3*27     5*20
              2*2*2*2       3*12          4*16         3*3*3*3  10*10
                            2*2*3*3       2*2*2*8               2*2*5*5
                                          2*2*4*4
                                          2*2*2*2*2*2
		

Crossrefs

Positions of 1's are 1 and A000040, squares A001248.
The additive version (partitions) is A000041, the even bisection of A119620.
Partitions of this type are ranked by A028982 and A347451.
The restriction to powers of 2 is A236913, the even bisection of A027187.
The nonsquared nonreciprocal even-length version is A347438.
This is the restriction to perfect squares of A347439.
The nonreciprocal version is A347458, non-squared A347437.
A000290 lists squares, complement A000037.
A001055 counts factorizations.
A046099 counts factorizations with no alternating permutations.
A273013 counts ordered factorizations of n^2 with alternating product 1.
A347460 counts possible alternating products of factorizations.
A339846 counts even-length factorizations.
A339890 counts odd-length factorizations.
A347457 ranks partitions with integer alternating product.
A347466 counts factorizations of n^2.

Programs

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

Formula

a(2^n) = A236913(n).
a(n) = A347439(n^2).

Extensions

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

A347705 Number of factorizations of n with reverse-alternating product > 1.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 2, 3, 1, 4, 1, 4, 2, 2, 1, 7, 1, 2, 3, 4, 1, 5, 1, 7, 2, 2, 2, 7, 1, 2, 2, 7, 1, 5, 1, 4, 4, 2, 1, 12, 1, 4, 2, 4, 1, 7, 2, 7, 2, 2, 1, 11, 1, 2, 4, 8, 2, 5, 1, 4, 2, 5, 1, 16, 1, 2, 4, 4, 2, 5, 1, 12, 3, 2, 1, 11, 2
Offset: 1

Views

Author

Gus Wiseman, Oct 12 2021

Keywords

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.

Examples

			The a(n) factorizations for n = 2, 6, 8, 12, 24, 30, 48, 60:
  2   6     8       12      24        30      48          60
      2*3   2*4     2*6     3*8       5*6     6*8         2*30
            2*2*2   3*4     4*6       2*15    2*24        3*20
                    2*2*3   2*12      3*10    3*16        4*15
                            2*2*6     2*3*5   4*12        5*12
                            2*3*4             2*3*8       6*10
                            2*2*2*3           2*4*6       2*5*6
                                              3*4*4       3*4*5
                                              2*2*12      2*2*15
                                              2*2*2*6     2*3*10
                                              2*2*3*4     2*2*3*5
                                              2*2*2*2*3
		

Crossrefs

Positions of 1's are A000430.
The weak version (>= instead of >) is A001055, non-reverse A347456.
The non-reverse version is A339890, strict A347447.
The version for reverse-alternating product 1 is A347438.
Allowing any integer reciprocal alternating product gives A347439.
The even-length case is A347440, also the opposite reverse version.
Allowing any integer rev-alt product gives A347442, non-reverse A347437.
The version for partitions is A347449, non-reverse A347448.
A001055 counts factorizations (strict A045778, ordered A074206).
A038548 counts possible rev-alt products of factorizations, integer A046951.
A103919 counts partitions by sum and alternating sum, reverse A344612.
A292886 counts knapsack factorizations, by sum A293627.
A347707 counts possible integer reverse-alternating products of partitions.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    revaltprod[q_]:=Product[q[[-i]]^(-1)^(i-1),{i,Length[q]}];
    Table[Length[Select[facs[n],revaltprod[#]>1&]],{n,100}]

Formula

a(n) = A001055(n) - A347438(n).
Previous Showing 11-20 of 28 results. Next