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

A347437 Number of factorizations of n with integer alternating product.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Sep 06 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 factorizations for n = 4, 16, 36, 48, 54, 64, 108:
  (4)   (16)      (36)      (48)        (54)    (64)          (108)
  (2*2) (4*4)     (6*6)     (2*4*6)     (2*3*9) (8*8)         (2*6*9)
        (2*2*4)   (2*2*9)   (3*4*4)     (3*3*6) (2*4*8)       (3*6*6)
        (2*2*2*2) (2*3*6)   (2*2*12)            (4*4*4)       (2*2*27)
                  (3*3*4)   (2*2*2*2*3)         (2*2*16)      (2*3*18)
                  (2*2*3*3)                     (2*2*4*4)     (3*3*12)
                                                (2*2*2*2*4)   (2*2*3*3*3)
                                                (2*2*2*2*2*2)
		

Crossrefs

Positions of 1's are A005117, complement A013929.
Allowing any alternating product <= 1 gives A339846.
Allowing any alternating product > 1 gives A339890.
The restriction to powers of 2 is A344607.
The even-length case is A347438, also the case of alternating product 1.
The reciprocal version is A347439.
Allowing any alternating product < 1 gives A347440.
The odd-length case is A347441.
The reverse version is A347442.
The additive version is A347446, ranked by A347457.
Allowing any alternating product >= 1 gives A347456.
The restriction to perfect squares is A347458, reciprocal A347459.
The ordered version is A347463.
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.

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],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)))); \\ Antti Karttunen, Oct 22 2023

Formula

a(2^n) = A344607(n).
a(n^2) = A347458(n).

Extensions

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

A347438 Number of unordered factorizations of n with alternating product 1.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 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, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Sep 06 2021

Keywords

Comments

Also the number of unordered factorizations of n with alternating sum 0.
Also the number of unordered factorizations of n with all even multiplicities.
This is the even-length case of A347437, the odd-length case being A347441.
An unordered 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 = 16, 64, 144, 256, 576:
  4*4      8*8          12*12        16*16            24*24
  2*2*2*2  2*2*4*4      2*2*6*6      2*2*8*8          3*3*8*8
           2*2*2*2*2*2  3*3*4*4      4*4*4*4          4*4*6*6
                        2*2*2*2*3*3  2*2*2*2*4*4      2*2*12*12
                                     2*2*2*2*2*2*2*2  2*2*2*2*6*6
                                                      2*2*3*3*4*4
                                                      2*2*2*2*2*2*3*3
		

Crossrefs

Positions of zeros are A000037.
Positions of nonzero terms are A000290.
The restriction to perfect squares is A001055 (ordered: A273013).
The restriction to powers of 2 is A035363.
The additive version is A119620, ranked by A028982.
Positions of non-1's are A213367 \ {1}.
Positions of 1's are A280076 = {1} \/ A001248.
Sorted first positions are 1, 2, and all terms of A330972 squared.
Allowing any alternating product <= 1 gives A339846.
Allowing any alternating product > 1 gives A339890.
Allowing any integer alternating product gives A347437.
Allowing any integer reciprocal alternating product gives A347439.
Allowing any alternating product < 1 gives A347440.
Allowing any alternating product >= 1 gives A347456.
A046099 counts factorizations with no alternating permutations.
A071321 gives the alternating sum of prime factors (reverse: A071322).
A316524 gives the alternating sum of prime indices (reverse: A344616).
A344606 counts alternating permutations of prime factors.
A347441 counts odd-length factorizations with integer alternating product.
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[facs[n],altprod[#]==1&]],{n,100}]
  • PARI
    A347438(n, m=n, k=0, t=1) = if(1==n, (1==t), my(s=0); fordiv(n, d, if((d>1)&&(d<=m), s += A347438(n/d, d, 1-k, t*(d^((-1)^k))))); (s)); \\ Antti Karttunen, Oct 30 2021

Formula

a(2^n) = A035363(n).
a(n^2) = A001055(n).

Extensions

Name and comments clarified (with unordered) by Jacob Sprittulla, Oct 05 2021

A347439 Number of factorizations of n with integer reciprocal alternating product.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Sep 07 2021

Keywords

Comments

All of these factorizations have an even number of factors, so their reverse-alternating product is also an integer.
A factorization of n is a weakly increasing sequence of positive integers > 1 with product n.
We define the reciprocal alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^i).
The value of a(n) does not depend solely on the prime signature of n. See the example comparing a(144) and a(400). - Antti Karttunen, Jul 28 2024

Examples

			The a(n) factorizations for
n    = 16,       36,       64,           72,       128,          144:
a(n) = 3,        4,        6,            5,        7,            11
--------------------------------------------------------------------------------
       2*8       6*6       8*8           2*36      2*64          2*72
       4*4       2*18      2*32          3*24      4*32          3*48
       2*2*2*2   3*12      4*16          6*12      8*16          4*36
                 2*2*3*3   2*2*2*8       2*2*3*6   2*2*4*8       6*24
                           2*2*4*4       2*3*3*4   2*4*4*4       12*12
                           2*2*2*2*2*2             2*2*2*16      2*2*6*6
                                                   2*2*2*2*2*4   2*3*3*8
                                                                 3*3*4*4
                                                                 2*2*2*18
                                                                 2*2*3*12
                                                                 2*2*2*2*3*3
From _Antti Karttunen_, Jul 28 2024 (Start)
For n=400, there are 12 such factorizations:
  2*200
  4*100
  5*80
  10*40
  20*20
  2*2*2*50
  2*2*5*20
  2*2*10*10
  2*4*5*10
  2*5*5*8
  4*4*5*5
  2*2*2*2*5*5.
Note that 400 = 2^4 * 5^2 has the same prime signature as 144 = 2^4 * 3^2. 400 = 2*4*5*10 is the factorization for which there is no analogous factorization of 144, as 2*3*4*6 doesn't satisfy the condition of having an integer reciprocal alternating product.
(End)
		

Crossrefs

Positions of 0's are A005117 \ {1}.
Positions of non-0's are 1 and A013929.
The restriction to powers of 2 is A027187, reverse A035363.
Positions of 1's are 1 and A082293.
The additive version is A119620, ranked by A347451 and A028982.
Allowing any alternating product <= 1 gives A339846.
Allowing any alternating product > 1 gives A339890.
The non-reciprocal version is A347437.
The reverse version is A347438.
Allowing any alternating product < 1 gives A347440.
The non-reciprocal reverse version is A347442.
Allowing any alternating product >= 1 gives A347456.
The restriction to perfect squares is A347459, non-reciprocal A347458.
A038548 counts possible reverse-alternating products of factorizations.
A046099 counts factorizations with no alternating permutations.
A071321 gives the alternating sum of prime factors (reverse: A071322).
A316524 gives the alternating sum of prime indices (reverse: A344616).
A273013 counts ordered factorizations of n^2 with alternating product 1.
A347441 counts odd-length factorizations with integer alternating product.
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]]}]];
    recaltprod[q_]:=Product[q[[i]]^(-1)^i,{i,Length[q]}];
    Table[Length[Select[facs[n],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)))); \\ Antti Karttunen, Jul 28 2024
    
  • PARI
    A347439(n, m=0, ap=1, e=1) = if(1==n, 1==denominator(ap), sumdiv(n, d, if(d>1 && d>=m, A347439(n/d, d, ap * d^((-1)^e), 1-e)))); \\ Antti Karttunen, Jul 28 2024

Formula

a(2^n) = A027187(n).
a(n^2) = A347459(n).

Extensions

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

A347442 Number of factorizations of n with integer reverse-alternating product.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Sep 08 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 = 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)
		

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.

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[Reverse[q][[i]]^(-1)^(i-1),{i,Length[q]}];
    Table[Length[Select[facs[n],IntegerQ@*revaltprod]],{n,100}]
  • 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

Formula

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

Extensions

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

A347446 Number of integer partitions of n with integer alternating product.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Sep 15 2021

Keywords

Comments

We define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)).

Examples

			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)
		

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.

Programs

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

A347456 Number of factorizations of n with alternating product >= 1.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 09 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.
Also the number of factorizations of n with alternating sum >= 0.

Examples

			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
		

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.

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],altprod[#]>=1&]],{n,100}]

Formula

a(n) = A347438(n) + A347440(n).

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

A347460 Number of distinct possible alternating products of factorizations of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 4, 1, 2, 2, 4, 1, 4, 1, 4, 2, 2, 1, 6, 2, 2, 3, 4, 1, 5, 1, 5, 2, 2, 2, 7, 1, 2, 2, 6, 1, 5, 1, 4, 4, 2, 1, 8, 2, 4, 2, 4, 1, 5, 2, 6, 2, 2, 1, 10, 1, 2, 4, 6, 2, 5, 1, 4, 2, 5, 1, 10, 1, 2, 4, 4, 2, 5, 1, 8, 4, 2, 1, 10, 2, 2
Offset: 1

Views

Author

Gus Wiseman, Oct 06 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.

Examples

			The a(n) alternating products for n = 1, 4, 8, 12, 24, 30, 36, 48, 60, 120:
  1  4  8    12   24   30    36   48    60    120
     1  2    3    6    10/3  9    12    15    30
        1/2  3/4  8/3  5/6   4    16/3  20/3  40/3
             1/3  2/3  3/10  1    3     15/4  15/2
                  3/8  2/15  4/9  3/4   12/5  24/5
                  1/6        1/4  1/3   3/5   10/3
                             1/9  3/16  5/12  5/6
                                  1/12  4/15  8/15
                                        3/20  3/10
                                        1/15  5/24
                                              2/15
                                              3/40
                                              1/30
		

Crossrefs

Positions of 1's are 1 and A000040.
Positions of 2's appear to be A001358.
Positions of 3's appear to be A030078.
Dominates A038548, the version for reverse-alternating product.
Counting only integers gives A046951.
The even-length case is A072670.
The version for partitions (not factorizations) is A347461, reverse A347462.
The odd-length case is A347708.
The length-3 case is A347709.
A001055 counts factorizations (strict A045778, ordered A074206).
A056239 adds up prime indices, row sums of A112798.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A108917 counts knapsack partitions, ranked by A299702.
A276024 counts distinct positive subset-sums of partitions, strict A284640.
A292886 counts knapsack factorizations, by sum A293627.
A299701 counts distinct subset-sums of prime indices, positive A304793.
A301957 counts distinct subset-products of prime indices.
A304792 counts distinct subset-sums of partitions.

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[Union[altprod/@facs[n]]],{n,100}]

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}]
Showing 1-10 of 22 results. Next