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

A028982 Squares and twice squares.

Original entry on oeis.org

1, 2, 4, 8, 9, 16, 18, 25, 32, 36, 49, 50, 64, 72, 81, 98, 100, 121, 128, 144, 162, 169, 196, 200, 225, 242, 256, 288, 289, 324, 338, 361, 392, 400, 441, 450, 484, 512, 529, 576, 578, 625, 648, 676, 722, 729, 784, 800, 841, 882, 900, 961, 968, 1024
Offset: 1

Views

Author

Keywords

Comments

Numbers n such that sum of divisors of n (A000203) is odd.
Also the numbers with an odd number of run sums (trapezoidal arrangements, number of ways of being written as the difference of two triangular numbers). - Ron Knott, Jan 27 2003
Pell(n)*Sum_{k|n} 1/Pell(k) is odd, where Pell(n) is A000129(n). - Paul Barry, Oct 12 2005
Number of odd divisors of n (A001227) is odd. - Vladeta Jovovic, Aug 28 2007
A071324(a(n)) is odd. - Reinhard Zumkeller, Jul 03 2008
Sigma(a(n)) = A000203(a(n)) = A152677(n). - Jaroslav Krizek, Oct 06 2009
Numbers n such that sum of odd divisors of n (A000593) is odd. - Omar E. Pol, Jul 05 2016
A187793(a(n)) is odd. - Timothy L. Tiffin, Jul 18 2016
If k is odd (k = 2m+1 for m >= 0), then 2^k = 2^(2m+1) = 2*(2^m)^2. If k is even (k = 2m for m >= 0), then 2^k = 2^(2m) = (2^m)^2. So, the powers of 2 sequence (A000079) is a subsequence of this one. - Timothy L. Tiffin, Jul 18 2016
Numbers n such that A175317(n) = Sum_{d|n} pod(d) is odd, where pod(m) = the product of divisors of m (A007955). - Jaroslav Krizek, Dec 28 2016
Positions of zeros in A292377 and A292383, positions of ones in A286357 and A292583. (See A292583 for why.) - Antti Karttunen, Sep 25 2017
Numbers of the form A000079(i)*A016754(j), i,j>=0. - R. J. Mathar, May 30 2020
Equivalently, numbers whose odd part is square. Cf. A042968. - Peter Munn, Jul 14 2020
These are the Heinz numbers of the partitions counted by A119620. - Gus Wiseman, Oct 29 2021
Numbers m whose abundance, A033880(m), is odd. - Peter Munn, May 23 2022
Numbers with an odd number of middle divisors (cf. A067742). - Omar E. Pol, Aug 02 2022

Crossrefs

Complement of A028983.
Characteristic function is A053866, A093709.
Odd terms in A178910.
Supersequence of A000079.

Programs

  • Haskell
    import Data.List.Ordered (union)
    a028982 n = a028982_list !! (n-1)
    a028982_list = tail $ union a000290_list a001105_list
    -- Reinhard Zumkeller, Jun 27 2015
    
  • Mathematica
    Take[ Sort[ Flatten[ Table[{n^2, 2n^2}, {n, 35}] ]], 57] (* Robert G. Wilson v, Aug 27 2004 *)
  • PARI
    list(lim)=vecsort(concat(vector(sqrtint(lim\1),i,i^2), vector(sqrtint(lim\2),i,2*i^2))) \\ Charles R Greathouse IV, Jun 16 2011
    
  • Python
    from itertools import count, islice
    from sympy.ntheory.primetest import is_square
    def A028982_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:int(is_square(n) or is_square(n<<1)),count(max(startvalue,1)))
    A028982_list = list(islice(A028982_gen(),30)) # Chai Wah Wu, Jan 09 2023
    
  • Python
    from math import isqrt
    def A028982(n):
        def f(x): return n-1+x-isqrt(x)-isqrt(x>>1)
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 22 2024

Formula

a(n) is asymptotic to c*n^2 with c = 2/(1+sqrt(2))^2 = 0.3431457.... - Benoit Cloitre, Sep 17 2002
In particular, a(n) = c*n^2 + O(n). - Charles R Greathouse IV, Jan 11 2013
a(A003152(n)) = n^2; a(A003151(n)) = 2*n^2. - Enrique Pérez Herrero, Oct 09 2013
Sum_{n>=1} 1/a(n) = Pi^2/4. - Amiram Eldar, Jun 28 2020

A028983 Numbers whose sum of divisors is even.

Original entry on oeis.org

3, 5, 6, 7, 10, 11, 12, 13, 14, 15, 17, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80, 82
Offset: 1

Views

Author

Keywords

Comments

The even terms of this sequence are the even terms appearing in A178910. [Edited by M. F. Hasler, Oct 02 2014]
A071324(a(n)) is even. - Reinhard Zumkeller, Jul 03 2008
Sigma(a(n)) = A000203(a(n)) = A152678(n). - Jaroslav Krizek, Oct 06 2009
A083207 is a subsequence. - Reinhard Zumkeller, Jul 19 2010
Numbers k such that the number of odd divisors of k (A001227) is even. - Omar E. Pol, Apr 04 2016
Numbers k such that the sum of odd divisors of k (A000593) is even. - Omar E. Pol, Jul 05 2016
Numbers with a squarefree part greater than 2. - Peter Munn, Apr 26 2020
Equivalently, numbers whose odd part is nonsquare. Compare with the numbers whose square part is even (i.e., nonodd): these are the positive multiples of 4, A008586\{0}, and A225546 provides a self-inverse bijection between the two sets. - Peter Munn, Jul 19 2020
Also numbers whose reversed prime indices have alternating product > 1, where 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 the partitions counted by A347448. - Gus Wiseman, Oct 29 2021
Numbers whose number of middle divisors is not odd (cf. A067742). - Omar E. Pol, Aug 02 2022

Crossrefs

The complement is A028982 = A000290 U A001105.
Subsequences: A083207, A091067, A145204\{0}, A225838, A225858.
Cf. A334748 (a permutation).
Related to A008586 via A225546.
Ranks the partitions counted by A347448, complement A119620.

Programs

  • Mathematica
    Select[Range[82],EvenQ[DivisorSigma[1,#]]&] (* Jayanta Basu, Jun 05 2013 *)
  • PARI
    is(n)=!issquare(n)&&!issquare(n/2) \\ Charles R Greathouse IV, Jan 11 2013
    
  • Python
    from math import isqrt
    def A028983(n):
        def f(x): return n-1+isqrt(x)+isqrt(x>>1)
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 22 2024

Formula

a(n) ~ n. - Charles R Greathouse IV, Jan 11 2013
a(n) = n + (1 + sqrt(2)/2)*sqrt(n) + O(1). - Charles R Greathouse IV, Sep 01 2015
A007913(a(n)) > 2. - Peter Munn, May 05 2020

A119620 Number of partitions of floor(3n/2) into n parts each from {1,2,...,n}.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 3, 5, 5, 7, 7, 11, 11, 15, 15, 22, 22, 30, 30, 42, 42, 56, 56, 77, 77, 101, 101, 135, 135, 176, 176, 231, 231, 297, 297, 385, 385, 490, 490, 627, 627, 792, 792, 1002, 1002, 1255, 1255, 1575, 1575, 1958, 1958, 2436, 2436, 3010, 3010, 3718, 3718
Offset: 0

Views

Author

John W. Layman, Jun 07 2006

Keywords

Comments

The bisection {1,1,2,3,5,7,11,15,22,...} agrees with the initial terms of A008641, Number of partitions of n into at most 12 parts and also A008635, Molien series for A_12.
a(2n+1)=a(2n) for all n>0. If the partition {...,1} is a member of a(2n) then the partition {...,1,1} is a member of a(2n+1). - Robert G. Wilson v, Jun 09 2006
Number of partitions of n where all parts (except for possibly the first part) are even; see example. - Joerg Arndt, Apr 22 2013
For n >= 2, a(n) = number of partitions p of n such that floor(n/2) is a part of p. For n >= 1, a(n) = number of partitions p of n such that ceiling(n/2) is a part of p. - Clark Kimberling, Feb 28 2014
From Gus Wiseman, Oct 28 2021: (Start)
If we insert zeros every three terms, this counts partitions of n such that n = floor(3*k/2), where k is the number of parts. This counts by sum rather than length. These partitions are ranked by A347452.
Also the number of integer partitions of n with alternating product 1, where the alternating product of a sequence (y_1,...,y_k) is Product_i y_i^((-1)^(i-1)). These are the conjugates of the partitions (ranked by A336119) described in Arndt's comment above. For example, the a(2) = 1 through a(10) = 7 partitions are:
11 111 22 221 33 331 44 441 55
1111 11111 2211 22111 2222 22221 3322
111111 1111111 3311 33111 4411
221111 2211111 222211
11111111 111111111 331111
22111111
1111111111
These partitions are ranked by A028982. The odd-length case is A035363 (shifted), which is also the version for sum instead of product. The multiplicative version (factorizations) is A347438.
(End)

Examples

			For n=8, floor(3*n/2) is 12 and there are five partitions of 12 into 8 parts each in the range 1-8 inclusive, namely: {5,1,1,1,1,1,1,1}, {4,2,1,1,1,1,1,1}, {3,3,1,1,1,1,1,1}, {3,2,2,1,1,1,1,1} and {2,2,2,2,1,1,1,1}. Thus a(8)=5.
From _Joerg Arndt_, Apr 22 2013: (Start)
a(8) = a(9) = 5, counting the following partitions where all parts (except for possibly the first part) are even:
01:  [ 2 2 2 2 ]
02:  [ 4 2 2 ]
03:  [ 4 4 ]
04:  [ 6 2 ]
05:  [ 8 ]
and
01:  [ 3 2 2 2 ]
02:  [ 5 2 2 ]
03:  [ 5 4 ]
04:  [ 7 2 ]
05:  [ 9 ]
(End)
G.f. = 1 + x + x^2 + x^3 + 2*x^4 + 2*x^5 + 3*x^6 + 3*x^7 + 5*x^8 + 5*x^9 + 7*x^10 + ...
		

Crossrefs

Both bisections are A000041.
An adjoint version is A108711.
A027187 counts partitions of even length.
A027193 counts partitions of odd length.
A325534 counts separable partitions.
A325535 counts inseparable partitions.

Programs

  • Maple
    # Using the function EULER from Transforms (see link at the bottom of the page).
    [1, op(EULER([1,0,seq(irem(n,2),n=2..55)]))]; # Peter Luschny, Aug 19 2020
  • Mathematica
    (* first do *) Needs["DiscreteMath`Combinatorica`"] (* then *) f[n_] := f[n] = Length@ Select[ Partitions[ Floor[3n/2], n], Length@# == n &]; Table[ If[n > 1, f[2Floor[n/2]], f[n]], {n, 57}] (* Robert G. Wilson v, Jun 09 2006 *)
    Table[ PartitionsP[ Floor[n/2]], {n, 57}] (* Robert G. Wilson v, Jun 09 2006 *)
    Table[Count[IntegerPartitions[n], p_ /; MemberQ[p, Ceiling[n/2]]], {n, 50}] (* Clark Kimberling, Feb 28 2014 *)
    a[ n_] := SeriesCoefficient[ (1 + x) / QPochhammer[x^2], {x, 0, n}]; (* Michael Somos, Mar 01 2014 *)
  • PARI
    a(n)=numbpart(n\2); \\ Joerg Arndt, Apr 22 2013

Formula

a(n) = A000041(floor(n/2)). - Vladeta Jovovic, Jun 10 2006
G.f.: (Sum_{n>=0} x^(4*n) / Product_{k=1..n} (1-x^(2*k))) / (1 - x). - Michael Somos, Mar 01 2014 [corrected by Jason Yuen, Jan 24 2025]

Extensions

More terms from Robert G. Wilson v, Jun 09 2006
Added a(0)=1. - Michael Somos, Mar 01 2014

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

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

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

A348379 Number of factorizations of n with an alternating permutation.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 2, 3, 1, 4, 1, 4, 2, 2, 1, 6, 1, 2, 2, 4, 1, 5, 1, 5, 2, 2, 2, 8, 1, 2, 2, 6, 1, 5, 1, 4, 4, 2, 1, 10, 1, 4, 2, 4, 1, 6, 2, 6, 2, 2, 1, 11, 1, 2, 4, 6, 2, 5, 1, 4, 2, 5, 1, 15, 1, 2, 4, 4, 2, 5, 1, 10, 3, 2, 1, 11, 2
Offset: 1

Views

Author

Gus Wiseman, Oct 28 2021

Keywords

Comments

First differs from A335434 at a(216) = 27, A335434(216) = 28. Also differs from A335434 at a(270) = 19, A335434(270) = 20.
A factorization of n is a weakly increasing sequence of positive integers > 1 with product n.
All of the counted factorizations are separable (A335434).
A sequence is alternating if it is alternately strictly increasing and strictly decreasing, starting with either. For example, the partition (3,2,2,2,1) has no alternating permutations, even though it does have the anti-run permutations (2,3,2,1,2) and (2,1,2,3,2). Alternating permutations of multisets are a generalization of alternating or up-down permutations of {1..n}.

Examples

			The a(270) = 19 factorizations:
  (2*3*3*15)  (2*3*45)  (2*135)  (270)
  (2*3*5*9)   (2*5*27)  (3*90)
  (3*3*5*6)   (2*9*15)  (5*54)
              (3*3*30)  (6*45)
              (3*5*18)  (9*30)
              (3*6*15)  (10*27)
              (3*9*10)  (15*18)
              (5*6*9)
		

Crossrefs

Partitions not of this type are counted by A345165, ranked by A345171.
Partitions of this type are counted by A345170, ranked by A345172.
Twins and partitions of this type are counted by A344740, ranked by A344742.
The case with twins is A347050.
The complement is counted by A348380, without twins A347706.
The ordered version is A348610.
A001055 counts factorizations, strict A045778, ordered A074206.
A001250 counts alternating permutations.
A025047 counts alternating or wiggly compositions, ranked by A345167.
A339846 counts even-length factorizations.
A339890 counts odd-length factorizations.

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) = A345170(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

A347706 Number of factorizations of n that are not a twin (x*x) nor have an alternating permutation.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Oct 28 2021

Keywords

Comments

First differs from A348381 at a(216) = 4, A348381(216) = 3.
A factorization of n is a weakly increasing sequence of positive integers > 1 with product n.
A sequence is alternating if it is alternately strictly increasing and strictly decreasing, starting with either. For example, the partition (3,2,2,2,1) has no alternating permutations, even though it does have the anti-run permutations (2,3,2,1,2) and (2,1,2,3,2). Alternating permutations of multisets are a generalization of alternating or up-down permutations of sets.

Examples

			The a(n) factorizations for n = 96, 192, 2160, 576:
  2*2*2*12      3*4*4*4         3*3*3*80       4*4*4*9
  2*2*2*2*6     2*2*2*24        6*6*6*10       2*2*2*72
  2*2*2*2*2*3   2*2*2*2*12      2*2*2*270      2*2*2*2*36
                2*2*2*2*2*6     2*3*3*3*40     2*2*2*2*4*9
                2*2*2*2*3*4     2*2*2*2*135    2*2*2*2*6*6
                2*2*2*2*2*2*3   2*2*2*2*3*45   2*2*2*2*2*18
                                2*2*2*2*5*27   2*2*2*2*3*12
                                2*2*2*2*9*15   2*2*2*2*2*2*9
                                               2*2*2*2*2*3*6
                                               2*2*2*2*2*2*3*3
		

Crossrefs

Positions of nonzero terms are A046099.
Partitions of this type are counted by A344654, ranked by A344653.
Partitions not of this type are counted by A344740, ranked by A344742.
The complement is counted by A347050, without twins A348379.
The version for compositions is A348377.
The version allowing twins is A348380.
The inseparable case is A348381.
A001055 counts factorizations, strict A045778, ordered A074206.
A001250 counts alternating permutations of sets.
A025047 counts alternating or wiggly compositions, ranked by A345167.
A339846 counts even-length factorizations.
A339890 counts odd-length factorizations.
A347438 counts factorizations with alternating product 1, additive A119620.
A348610 counts alternating ordered factorizations.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[facs[n],Function[f,Select[Permutations[f],!MatchQ[#,{_,x_,y_,z_,_}/;x<=y<=z||x>=y>=z]&]=={}]]],{n,100}]

Formula

a(2^n) = A344654(n).
Showing 1-10 of 36 results. Next