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 19 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

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

A002119 Bessel polynomial y_n(-2).

Original entry on oeis.org

1, -1, 7, -71, 1001, -18089, 398959, -10391023, 312129649, -10622799089, 403978495031, -16977719590391, 781379079653017, -39085931702241241, 2111421691000680031, -122501544009741683039, 7597207150294985028449, -501538173463478753560673
Offset: 0

Views

Author

Keywords

Comments

Absolute values give denominators of successive convergents to e using continued fraction 1+2/(1+1/(6+1/(10+1/(14+1/(18+1/(22+1/26...)))))).
Absolute values give number of different arrangements of nonnegative integers on a set of n 6-sided dice such that the dice can add to any integer from 0 to 6^n-1. For example when n=2, there are 7 arrangements that can result in any total from 0 to 35. Cf. A273013. The number of sides on the dice only needs to be the product of two distinct primes, of which 6 is the first example. - Elliott Line, Jun 10 2016
Absolute values give number of Krasner factorizations of (x^(6^n)-1)/(x-1) into n polynomials p_i(x), i=1,2,...,n, satisfying p_i(1)=6. In these expressions 6 can be replaced with any product of two distinct primes (Krasner and Ranulac, 1937). - William P. Orrick, Jan 18 2023
Absolute values give number of pairs (s, b) where s is a covering of the 1 X 2n grid with 1 X 2 dimers and equal numbers of red and blue 1 X 1 monomers and b is a bijection between the red monomers and the blue monomers that does not map adjacent monomers to each other. Ilya Gutkovskiy's formula counts such pairs by an inclusion-exclusion argument. The correspondence with Elliott Line's dice problem is that a dimer corresponds to a die containing an arithmetic progression of length 6 and a pair (r, b(r)), where r is a red monomer and b(r) its image under b, corresponds to a die containing the sum of an arithmetic progression of length 2 and an arithmetic progression of length 3. - William P. Orrick, Jan 19 2023

Examples

			Example from _William P. Orrick_, Jan 19 2023: (Start)
For n=2 the Bessel polynomial is y_2(x) = 1 + 3x + 3x^2 which satisfies y_2(-2) = -7.
The |a(2)|=7 dice pairs are
  {{0,1,2,3,4,5}, {0,6,12,18,24,30}},
  {{0,1,2,18,19,20}, {0,3,6,9,12,15}},
  {{0,1,2,9,10,11}, {0,3,6,18,21,24}},
  {{0,1,6,7,12,13}, {0,2,4,18,20,22}},
  {{0,1,12,13,24,25}, {0,2,4,6,8,10}},
  {{0,1,2,6,7,8}, {0,3,12,15,24,27}},
  {{0,1,4,5,8,9}, {0,2,12,14,24,26}}.
The corresponding Krasner factorizations of (x^36-1)/(x-1) are
  {(x^6-1)/(x-1), (x^36-1)/(x^6-1)},
  {((x^36-1)/(x^18-1))*((x^3-1)/(x-1)), (x^18-1)/(x^3-1)},
  {((x^18-1)/(x^9-1))*((x^3-1)/(x-1)), ((x^36-1)/(x^18-1))*((x^9-1)/(x^3-1))},
  {((x^18-1)/(x^6-1))*((x^2-1)/(x-1)), ((x^36-1)/(x^18-1))*((x^6-1)/(x^2-1))},
  {((x^36-1)/(x^12-1))*((x^2-1)/(x-1)), (x^12-1)/(x^2-1)},
  {((x^12-1)/(x^6-1))*((x^3-1)/(x-1)), ((x^36-1)/(x^12-1))*((x^6-1)/(x^3-1))},
  {((x^12-1)/(x^4-1))*((x^2-1)/(x-1)), ((x^36-1)/(x^12-1))*((x^4-1)/(x^2-1))}.
The corresponding monomer-dimer configurations, with dimers, red monomers, and blue monomers represented by the symbols '=', 'R', and 'B', and bijections between red and blue monomers given as sets of ordered pairs, are
  (==, {}),
  (B=R, {(3,1)}),
  (BBRR, {(3,1),(4,2)}),
  (RBBR, {(1,3),(4,2)}),
  (R=B, {(1,3)}),
  (BRRB, {(2,4),(3,1)}),
  (RRBB, {(1,3),(2,4)}).
(End)
		

References

  • L. Euler, 1737.
  • J. Riordan, Combinatorial Identities, Wiley, 1968, p. 77.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See also A033815.
Numerators of the convergents of e are A001517, which has a similar interpretation to a(n) in terms of monomer-dimer configurations, but omitting the restriction that adjacent monomers not be mapped to each other by the bijection.
Polynomial coefficients are in A001498.

Programs

  • Maple
    f:=proc(n) option remember; if n <= 1 then 1 else f(n-2)+(4*n-2)*f(n-1); fi; end;
    [seq(f(n), n=0..20)]; # This is for the unsigned version. - N. J. A. Sloane, May 09 2016
    seq(simplify((-1)^n*KummerU(-n, -2*n, -1)), n = 0..17); # Peter Luschny, May 10 2022
  • Mathematica
    Table[(-1)^k (2k)! Hypergeometric1F1[-k, -2k, -1]/k!, {k, 0, 10}] (* Vladimir Reshetnikov, Feb 16 2011 *)
    nxt[{n_,a_,b_}]:={n+1,b,a-2b(2n+1)}; NestList[nxt,{1,1,-1},20][[All,2]] (* Harvey P. Dale, Aug 18 2017 *)
  • PARI
    {a(n)= if(n<0, n=-n-1); sum(k=0, n, (2*n-k)!/ (k!*(n-k)!)* (-1)^(n-k) )} /* Michael Somos, Apr 02 2007 */
    
  • PARI
    {a(n)= local(A); if(n<0, n= -n-1); A= sqrt(1 +4*x +x*O(x^n)); n!*polcoeff( exp((A-1)/2)/A, n)} /* Michael Somos, Apr 02 2007 */
    
  • PARI
    {a(n)= local(A); if(n<0, n= -n-1); n+=2 ; for(k= 1, n, A+= x*O(x^k); A= truncate( (1+x)* exp(A) -1-A) ); A+= x*O(x^n); A-= A^2; -(-1)^n*n!* polcoeff( serreverse(A), n)} /* Michael Somos, Apr 02 2007 */
    
  • Sage
    A002119 = lambda n: hypergeometric([-n, n+1], [], 1)
    [simplify(A002119(n)) for n in (0..17)] # Peter Luschny, Oct 17 2014

Formula

D-finite with recurrence a(n) = -2(2n-1)*a(n-1) + a(n-2). - T. D. Noe, Oct 26 2006
If y = x + Sum_{k>=2} A005363(k)*x^k/k!, then y = x + Sum_{k>=2} a(k-2)(-y)^k/k!. - Michael Somos, Apr 02 2007
a(-n-1) = a(n). - Michael Somos, Apr 02 2007
a(n) = (1/n!)*Integral_{x>=-1} (-x*(1+x))^n*exp(-(1+x)). - Paul Barry, Apr 19 2010
G.f.: 1/Q(0), where Q(k) = 1 - x + 2*x*(k+1)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 17 2013
Expansion of exp(x) in powers of y = x*(1 + x): exp(x) = 1 + y - y^2/2! + 7*y^3/3! - 71*y^4/4! + 1001*y^5/5! - .... E.g.f.: (1/sqrt(4*x + 1))*exp(sqrt(4*x + 1)/2 - 1/2) = 1 - x + 7*x^2/2! - 71*x^3/3! + .... - Peter Bala, Dec 15 2013
a(n) = hypergeom([-n, n+1], [], 1). - Peter Luschny, Oct 17 2014
a(n) = sqrt(Pi/exp(1)) * BesselI(1/2+n, 1/2) + (-1)^n * BesselK(1/2+n, 1/2) / sqrt(exp(1)*Pi). - Vaclav Kotesovec, Jul 22 2015
a(n) ~ (-1)^n * 2^(2*n+1/2) * n^n / exp(n+1/2). - Vaclav Kotesovec, Jul 22 2015
From G. C. Greubel, Aug 16 2017: (Start)
G.f.: (1/(1-t))*hypergeometric2f0(1, 1/2; -; -4*t/(1-t)^2).
E.g.f.: (1+4*t)^(-1/2) * exp((sqrt(1+4*t) - 1)/2). (End)
a(n) = Sum_{k=0..n} (-1)^k*binomial(n,k)*binomial(n+k,k)*k!. - Ilya Gutkovskiy, Nov 24 2017
a(n) = (-1)^n*KummerU(-n, -2*n, -1). - Peter Luschny, May 10 2022

Extensions

More terms from Vladeta Jovovic, Apr 03 2000

A347440 Number of factorizations of n with alternating product < 1.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 2, 1, 1, 0, 4, 0, 1, 1, 2, 0, 3, 0, 3, 1, 1, 1, 3, 0, 1, 1, 4, 0, 3, 0, 2, 2, 1, 0, 6, 0, 2, 1, 2, 0, 4, 1, 4, 1, 1, 0, 6, 0, 1, 2, 3, 1, 3, 0, 2, 1, 3, 0, 8, 0, 1, 2, 2, 1, 3, 0, 6, 1, 1, 0, 6, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Sep 07 2021

Keywords

Comments

All such factorizations have even length and alternating sum < 0, so partitions of this type are counted by A344608.
Also the number of factorizations of n with alternating sum < 0.
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 = 6, 12, 24, 30, 48, 72, 96, 120:
  2*3  2*6  3*8      5*6   6*8      8*9      2*48         2*60
       3*4  4*6      2*15  2*24     2*36     3*32         3*40
            2*12     3*10  3*16     3*24     4*24         4*30
            2*2*2*3        4*12     4*18     6*16         5*24
                           2*2*2*6  6*12     8*12         6*20
                           2*2*3*4  2*2*2*9  2*2*3*8      8*15
                                    2*2*3*6  2*2*4*6      10*12
                                    2*3*3*4  2*3*4*4      2*2*5*6
                                             2*2*2*12     2*3*4*5
                                             2*2*2*2*2*3  2*2*2*15
                                                          2*2*3*10
		

Crossrefs

Positions of 0's are A000430.
Positions of 2's are A054753.
Positions of non-0's are A080257.
Positions of 1's are A332269.
The weak version (<= 1 instead of < 1) is A339846, ranked by A028982.
The reciprocal version is A339890.
The additive version is A344608, ranked by A119899.
The even-sum additive version is A344743, ranked by A119899 /\ A300061.
Allowing any integer alternating product gives A347437, additive A347446.
The equal version (= 1 instead of < 1) is A347438.
Allowing any integer reciprocal alternating product gives A347439.
The complement (>= 1 instead of < 1) is counted by A347456.
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).
A236913 counts partitions of 2n with reverse-alternating sum <= 0.
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],altprod[#]<1&]],{n,100}]

Formula

a(2^n) = A344608(n).
a(n) = A339846(n) - A347438(n).

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

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
Showing 1-10 of 19 results. Next