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 10 results.

A046951 a(n) is the number of squares dividing n.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 3, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 3, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 3, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 4, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 2, 2, 1, 1, 1, 3, 3, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 3, 1, 2, 2, 4, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2
Offset: 1

Views

Author

Simon Colton (simonco(AT)cs.york.ac.uk)

Keywords

Comments

Rediscovered by the HR automatic theory formation program.
a(n) depends only on prime signature of n (cf. A025487, A046523). So a(24) = a(375) since 24 = 2^3*3 and 375 = 3*5^3 both have prime signature (3, 1).
First differences of A013936. Average value tends towards Pi^2/6 = 1.644934... (A013661, A013679). - Henry Bottomley, Aug 16 2001
We have a(n) = A159631(n) for all n < 125, but a(125) = 2 < 3 = A159631(125). - Steven Finch, Apr 22 2009
Number of 2-generated Abelian groups of order n, if n > 1. - Álvar Ibeas, Dec 22 2014 [In other words, number of order-n abelian groups with rank <= 2. Proof: let b(n) be such number. A finite abelian group is the inner direct product of all Sylow-p subgroups, so {b(n)} is multiplicative. Obviously b(p^e) = floor(e/2)+1 (corresponding to the groups C_(p^r) X C_(p^(e-r)) for 0 <= r <= floor(e/2)), hence b(n) = a(n) for all n. - Jianing Song, Nov 05 2022]
Number of ways of writing n = r*s such that r|s. - Eric M. Schmidt, Jan 08 2015
The number of divisors of the square root of the largest square dividing n. - Amiram Eldar, Jul 07 2020
The number of unordered factorizations of n into cubefree powers of primes (1, primes and squares of primes, A166684). - Amiram Eldar, Jun 12 2025

Examples

			a(16) = 3 because the squares 1, 4, and 16 divide 16.
G.f. = x + x^2 + x^3 + 2*x^4 + x^5 + x^6 + x^7 + 2*x^8 + 2*x^9 + x^10 + ...
		

Crossrefs

One more than A071325.
Differs from A096309 for the first time at n=32, where a(32) = 3, while A096309(32) = 2 (and also A185102(32) = 2).
Sum of the k-th powers of the square divisors of n for k=0..10: this sequence (k=0), A035316 (k=1), A351307 (k=2), A351308 (k=3), A351309 (k=4), A351310 (k=5), A351311 (k=6), A351313 (k=7), A351314 (k=8), A351315 (k=9), A351315 (k=10).
Sequences of the form n^k * Sum_{d^2|n} 1/d^k for k = 0..10: this sequence (k=0), A340774 (k=1), A351600 (k=2), A351601 (k=3), A351602 (k=4), A351603 (k=5), A351604 (k=6), A351605 (k=7), A351606 (k=8), A351607 (k=9), A351608 (k=10).
Cf. A082293 (a(n)==2), A082294 (a(n)==3).

Programs

  • Haskell
    a046951 = sum . map a010052 . a027750_row
    -- Reinhard Zumkeller, Dec 16 2013
    
  • Magma
    [#[d: d in Divisors(n)|IsSquare(d)]:n in [1..120]]; // Marius A. Burtea, Jan 21 2020
    
  • Maple
    A046951 := proc(n)
        local a,s;
        a := 1 ;
        for p in ifactors(n)[2] do
            a := a*(1+floor(op(2,p)/2)) ;
        end do:
        a ;
    end proc: # R. J. Mathar, Sep 17 2012
    # Alternatively:
    isbidivisible := (n, d) -> igcd(n, d) = d and igcd(n/d, d) = d:
    a := n -> nops(select(k -> isbidivisible(n, k), [seq(1..n)])): # Peter Luschny, Jun 13 2025
  • Mathematica
    a[n_] := Length[ Select[ Divisors[n], IntegerQ[Sqrt[#]]& ] ]; Table[a[n], {n, 1, 105}] (* Jean-François Alcover, Jun 26 2012 *)
    Table[Length[Intersection[Divisors[n], Range[10]^2]], {n, 100}] (* Alonso del Arte, Dec 10 2012 *)
    a[ n_] := If[ n < 1, 0, Sum[ Mod[ DivisorSigma[ 0, d], 2], {d, Divisors @ n}]]; (* Michael Somos, Jun 13 2014 *)
    a[ n_] := If[ n < 2, Boole[ n == 1], Times @@ (Quotient[ #[[2]], 2] + 1 & /@ FactorInteger @ n)]; (* Michael Somos, Jun 13 2014 *)
    a[ n_] := If[ n < 0, 0, SeriesCoefficient[ Sum[ x^k^2 / (1 - x^k^2), {k, Sqrt @ n}], {x, 0, n}]]; (* Michael Somos, Jun 13 2014 *)
    f[p_, e_] := 1 + Floor[e/2]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Sep 15 2020 *)
  • PARI
    a(n)=my(f=factor(n));for(i=1,#f[,1],f[i,2]\=2);numdiv(factorback(f)) \\ Charles R Greathouse IV, Dec 11 2012
    
  • PARI
    a(n) = direuler(p=2, n, 1/((1-X^2)*(1-X)))[n]; \\ Michel Marcus, Mar 08 2015
    
  • PARI
    a(n)=factorback(apply(e->e\2+1, factor(n)[,2])) \\ Charles R Greathouse IV, Sep 17 2015
    
  • Python
    from math import prod
    from sympy import factorint
    def A046951(n): return prod((e>>1)+1 for e in factorint(n).values()) # Chai Wah Wu, Aug 04 2024
    
  • Python
    def is_bidivisible(n, d) -> bool: return gcd(n, d) == d and gcd(n//d, d) == d
    def aList(n) -> list[int]: return [k for k in range(1, n+1) if is_bidivisible(n, k)]
    print([len(aList(n)) for n in range(1, 126)])  # Peter Luschny, Jun 13 2025
  • Scheme
    (definec (A046951 n) (if (= 1 n) 1 (* (A008619 (A007814 n)) (A046951 (A064989 n)))))
    (define (A008619 n) (+ 1 (/ (- n (modulo n 2)) 2)))
    ;; Antti Karttunen, Nov 14 2016
    

Formula

a(p^k) = A008619(k) = [k/2] + 1. a(A002110(n)) = 1 for all n. (This is true for any squarefree number, A005117). - Original notes clarified by Antti Karttunen, Nov 14 2016
a(n) = |{(i, j) : i*j = n AND i|j}| = |{(i, j) : i*j^2 = n}|. Also tau(A000188(n)), where tau = A000005.
Multiplicative with p^e --> floor(e/2) + 1, p prime. - Reinhard Zumkeller, May 20 2007
a(A130279(n)) = n and a(m) <> n for m < A130279(n); A008966(n)=0^(a(n) - 1). - Reinhard Zumkeller, May 20 2007
Inverse Moebius transform of characteristic function of squares (A010052). Dirichlet g.f.: zeta(s)*zeta(2s).
G.f.: Sum_{k > 0} x^(k^2)/(1 - x^(k^2)). - Vladeta Jovovic, Dec 13 2002
a(n) = Sum_{k=1..A000005(n)} A010052(A027750(n,k)). - Reinhard Zumkeller, Dec 16 2013
a(n) = Sum_{k = 1..n} ( floor(n/k^2) - floor((n-1)/k^2) ). - Peter Bala, Feb 17 2014
From Antti Karttunen, Nov 14 2016: (Start)
a(1) = 1; for n > 1, a(n) = A008619(A007814(n)) * a(A064989(n)).
a(n) = A278161(A156552(n)). (End)
G.f.: Sum_{k>0}(theta(q^k)-1)/2, where theta(q)=1+2q+2q^4+2q^9+2q^16+... - Mamuka Jibladze, Dec 04 2016
From Antti Karttunen, Nov 12 2017: (Start)
a(n) = A000005(n) - A056595(n).
a(n) = 1 + A071325(n).
a(n) = 1 + A001222(A293515(n)). (End)
L.g.f.: -log(Product_{k>=1} (1 - x^(k^2))^(1/k^2)) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, Jul 30 2018
a(n) = Sum_{d|n} A000005(d) * A008836(n/d). - Torlach Rush, Jan 21 2020
a(n) = A000005(sqrt(A008833(n))). - Amiram Eldar, Jul 07 2020
a(n) = Sum_{d divides n} mu(core(d)^2), where core(n) = A007913(n). - Peter Bala, Jan 24 2024

Extensions

Data section filled up to 125 terms and wrong claim deleted from Crossrefs section by Antti Karttunen, Nov 14 2016

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

A048111 Number of unitary divisors of n (A034444) < number of non-unitary divisors of n (A048105).

Original entry on oeis.org

16, 32, 36, 48, 64, 72, 80, 81, 96, 100, 108, 112, 128, 144, 160, 162, 176, 180, 192, 196, 200, 208, 216, 224, 225, 240, 243, 252, 256, 272, 288, 300, 304, 320, 324, 336, 352, 360, 368, 384, 392, 396, 400, 405, 416, 432, 441, 448, 450, 464, 468, 480, 484
Offset: 1

Views

Author

Keywords

Comments

Numbers n that are expressible as a product of 2 "nonsquarefree" numbers (i.e., there are 2 integers x,y in A001694 such that n = xy). - Benoit Cloitre, Jan 01 2003
Also numbers having more than one square divisor > 1: A046951(a(n)) > 2. - Reinhard Zumkeller, Apr 08 2003
The asymptotic density of this sequence is 1 - (6/Pi^2)*(1 + Sum_{n>=1} 1/prime(n)^2) = 1 - A059956 * (1 + A085548) = 0.1171394347594477824... . - Amiram Eldar, Sep 25 2022

Examples

			36 is in the sequence since the number of its unitary divisors, {1, 4, 9, 36} is 4 which is smaller than 5, the number of its non-unitary divisors, {2, 3, 6, 12, 18}.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[484], DivisorSigma[0, #] > 2^(PrimeNu[#]+1) &] (* Amiram Eldar, Jun 11 2019 *)
  • PARI
    is(n)=my(f=factor(n)[,2],t); for(i=1,#f,if(f[i]>1, if(t||f[i]>3, return(1), t=1))); 0 \\ Charles R Greathouse IV, Sep 17 2015

Formula

A000005(a(n)) > 2^(1 + A001221(a(n))).

A252849 Numbers with an even number of square divisors.

Original entry on oeis.org

4, 8, 9, 12, 18, 20, 24, 25, 27, 28, 36, 40, 44, 45, 49, 50, 52, 54, 56, 60, 63, 64, 68, 72, 75, 76, 84, 88, 90, 92, 98, 99, 100, 104, 108, 116, 117, 120, 121, 124, 125, 126, 128, 132, 135, 136, 140, 144, 147, 148
Offset: 1

Views

Author

Walker Dewey Anderson, Mar 22 2015

Keywords

Comments

Closed lockers in the locker problem where the student numbers are the set of perfect squares.
The locker problem is a classic mathematical problem. Imagine a row containing an infinite number of lockers numbered from one to infinity. Also imagine an infinite number of students numbered from one to infinity. All of the lockers begin closed. The first student opens every locker that is a multiple of one, which is every locker. The second student closes every locker that is a multiple of two, so all of the even-numbered lockers are closed. The third student opens or closes every locker that is a multiple of three. This process continues for all of the students.
A variant on the locker problem is when not all student numbers are considered; in the case of this sequence, only the square-numbered students open and close lockers. The sequence here is a list of the closed lockers after all of the students have gone.
From Amiram Eldar, Jul 07 2020: (Start)
Numbers k such that the largest square dividing k (A008833) is not a fourth power.
The asymptotic density of this sequence is 1 - Pi^2/15 = 1 - A182448 = 0.342026... (Cesàro, 1885). (End)
Closed under application of A331590: for n, k >= 1, A331590(a(n), k) is in the sequence. - Peter Munn, Sep 18 2020

Crossrefs

Complement of A252895.
A046951, A335324 are used in a formula defining this sequence.
Disjoint union of A336593 and A336594.
A030140, A038109, A082293, A217319 are subsequences.
Ordered 3rd trisection of A225546.

Programs

Formula

From Peter Munn, Sep 18 2020: (Start)
Numbers k such that A046951(k) mod 2 = 0.
Numbers k such that A335324(k) > 1.
(End)

A222056 Decimal expansion of (6/Pi^2)*Sum_{n>=1} 1/prime(n)^2.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Feb 06 2013

Keywords

Comments

This is the probability that the gcd of any two integers is prime. - David Cushing, Mar 27 2013
The asymptotic density of integers whose largest square divisor is a square of a prime (A082293). - Amiram Eldar, Jul 07 2020

Examples

			0.27493346338652558891753873872267935690981646197586235178986...
		

References

  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, 2003, Section 2.2, p. 95.

Crossrefs

Programs

  • Mathematica
    Drop[Flatten[RealDigits[N[PrimeZetaP[2] 6/Pi^2, 100]]], -1] (* Geoffrey Critzer, Jan 17 2015 *)
  • PARI
    eps()=2.>>bitprecision(1.)
    primezeta(s)=my(t=s*log(2)); sum(k=1,lambertw(t/eps())\t, moebius(k)/k*log(abs(zeta(k*s))))
    primezeta(2)*6/Pi^2 \\ Charles R Greathouse IV, Jul 30 2016
    
  • PARI
    sumeulerrat(1/p, 2)/zeta(2) \\ Amiram Eldar, Mar 18 2021

A375341 The maximum exponent in the prime factorization of the numbers that have exactly one non-unitary prime factor.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Aug 12 2024

Keywords

Comments

The positive terms in A375339.

Crossrefs

Programs

  • Mathematica
    s[n_] := Module[{e = Select[FactorInteger[n][[;; , 2]], # > 1 &]}, If[Length[e] == 1, e[[1]], Nothing]]; Array[s, 300]
  • PARI
    lista(kmax) = {my(e); for(k = 1, kmax, e = select(x -> x > 1, factor(k)[,2]); if(#e == 1, print1(e[1], ", ")));}

Formula

a(n) = A051903(A190641(n)).
a(n) = A005361(A190641(n)).
a(n) = A375339(A190641(n)).
a(n) = A132349(A057521(A190641(n))).
a(n) = 2 if and only if A190641(n) is in A060687.
a(n) = 3 if and only if A190641(n) is in A048109.
a(n) <= 3 if and only if A190641(n) is in A082293.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p prime} (2*p-1)/((p-1)*(p^2-1)) / Sum_{p prime} 1/(p^2-1) = A375340 / A154945 = 2.74622231282166656595... .
Asymptotic second raw moment: = Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k)^2 = Sum_{p prime} (4*p^2-3*p+1)/((p-1)^3*(p+1)) / Sum_{p prime} 1/(p^2-1) = 9.064902009520365378603... .

A347048 Number of even-length ordered factorizations of n with integer 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, 4, 0, 0, 0, 7, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 6, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 11, 0, 0, 0, 1, 0, 0, 0, 11, 0, 0, 1, 1, 0, 0, 0, 6, 3, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 8, 0, 1, 1, 7, 0, 0, 0, 1, 0
Offset: 1

Views

Author

Gus Wiseman, Oct 10 2021

Keywords

Comments

An ordered factorization of n is a sequence of positive integers > 1 with product n.
We define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)).

Examples

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

Crossrefs

Positions of 0's are A005117 \ {2}.
The restriction to powers of 2 is A027306.
Heinz numbers of partitions of this type are A028260 /\ A347457.
Positions of 3's appear to be A030514.
Positions of 1's are 1 and A082293.
Allowing non-integer alternating product gives A174725, unordered A339846.
The odd-length version is A347049.
The unordered version is A347438, reverse A347439.
Allowing any length gives A347463.
Partitions of this type are counted by A347704, reverse A035363.
A001055 counts factorizations (strict A045778, ordered A074206).
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A119620 counts partitions with alternating product 1, ranked by A028982.
A273013 counts ordered factorizations of n^2 with alternating product 1.
A339890 counts odd-length factorizations, ordered A174726.
A347050 = factorizations with alternating permutation, complement A347706.
A347437 = factorizations with integer alternating product, reverse A347442.
A347446 = partitions with integer alternating product, reverse A347445.
A347460 counts possible alternating products of factorizations.

Programs

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

Formula

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

Extensions

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

A375339 If n has exactly one non-unitary prime factor then a(n) is the exponent of the highest power of this prime that divides n, otherwise a(n) = 0.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Aug 12 2024

Keywords

Comments

First differs from A212172, A275812 and A372603 at n = 36.
If n = m * p^e, such that m is squarefree, p is a prime that does not divide m and e >= 2, then a(n) = e, otherwise a(n) = 0.
By definition all the positive terms are larger than 1.
The asymptotic density of 0's in this sequence is 1 - Sum_{p prime} (1/(p^2-1)) / zeta(2) = 1 - A059956 * A154945 = 0.66461069244308962639... .
The asymptotic density of the occurrences of k >= 2 in this sequence is Sum_{p prime} (1/(p^(k-1)*(p+1))) / zeta(2). E.g., 0.200755... (A271971) for k = 2, 0.0741777... for k = 3, and 0.0320652... for k = 4.

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{e = Select[FactorInteger[n][[;; , 2]], # > 1 &]}, If[Length[e] == 1, e[[1]], 0]]; Array[a, 100]
  • PARI
    a(n) = {my(e = select(x -> x > 1, factor(n)[,2])); if(#e == 1, e[1], 0);}

Formula

a(n) = A051903(n) * A359466(n).
a(n) = A005361(n) * A359466(n).
a(A190641(n)) >= 2.
a(n) = 2 if and only if n is in A060687.
a(n) = 3 if and only if n is in A048109.
a(n) <= 3 if and only if n is in A082293.
Asymptotic second raw moment: = Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k)^2 = Sum_{p prime} (4*p^2-3*p+1)/((p-1)^3*(p+1)) / zeta(2) = 3.04027120804428071157... .

A344417 Number of palindromic factorizations of n.

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, 5, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 4, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 7, 1, 1, 1, 2, 1, 1, 1, 5, 1, 1, 2, 2, 1, 1, 1, 4, 4, 1, 1, 2, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, May 22 2021

Keywords

Comments

A palindrome is a sequence that is the same whether it is read forward or in reverse. A palindromic factorization of n is a finite multiset of positive integers > 1 with product n that can be permuted into a palindrome.

Examples

			The palindromic factorizations for n = 2, 4, 16, 36, 64, 144:
  (2)  (4)    (16)       (36)       (64)           (144)
       (2*2)  (4*4)      (6*6)      (8*8)          (12*12)
              (2*2*4)    (2*2*9)    (4*4*4)        (4*4*9)
              (2*2*2*2)  (3*3*4)    (2*2*16)       (4*6*6)
                         (2*2*3*3)  (2*2*4*4)      (2*2*36)
                                    (2*2*2*2*4)    (3*3*16)
                                    (2*2*2*2*2*2)  (2*2*6*6)
                                                   (3*3*4*4)
                                                   (2*2*2*2*9)
                                                   (2*2*3*3*4)
                                                   (2*2*2*2*3*3)
		

Crossrefs

Positions of 1's are A005117.
The case of palindromic compositions is A016116.
The additive version (palindromic partitions) is A025065.
The case of palindromic prime signature is A242414.
The case of palindromic plane trees is A319436.
A001055 counts factorizations.
A229153 ranks non-palindromic partitions.
A265640 ranks palindromic partitions.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    palQ[y_]:=Select[Permutations[y],#==Reverse[#]&]!={};
    Table[Length[Select[facs[n],palQ]],{n,50}]

Formula

a(2^n) = A025065(n).
a(n) = A057567(A000188(n)). - Andrew Howroyd, May 22 2021

A382295 Decimal expansion of the asymptotic mean of the number of ways to factor k into "Fermi-Dirac primes" when k runs over the positive integers.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Mar 21 2025

Keywords

Examples

			1.78763680016944566698863293948945988146590046137002...
		

Crossrefs

Cf. A005117 (positions of 1's in A050377), A050377, A082293 (positions of 2's), A330687 (positions of records).

Programs

  • Mathematica
    $MaxExtraPrecision = 1500; m = 1500; em = 50; f[x_] := Log[1-x] - Sum[Log[1-x^(2^k)], {k, 0, em}]; c = Rest[CoefficientList[Series[f[x], {x, 0, m}], x] * Range[0, m]]; RealDigits[Exp[NSum[Indexed[c, k] * PrimeZetaP[k]/k, {k, 2, m}, NSumTerms -> m, WorkingPrecision -> m]], 10, 120][[1]]
  • PARI
    default(realprecision, 120); default(parisize, 10000000);
    f(x, n) = (1-x) / prod(k = 0, n, (1 - x^(2^k)));
    prodeulerrat(f(1/p, 10))

Formula

Equals lim_{m->oo} (1/m) * Sum_{k=1..m} A050377(k).
Equals Product_{p prime} f(1/p), where f(x) = (1-x) / Product_{k>=0} (1 - x^(2^k)).
Showing 1-10 of 10 results.