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

A007427 Moebius transform applied twice to sequence 1,0,0,0,....

Original entry on oeis.org

1, -2, -2, 1, -2, 4, -2, 0, 1, 4, -2, -2, -2, 4, 4, 0, -2, -2, -2, -2, 4, 4, -2, 0, 1, 4, 0, -2, -2, -8, -2, 0, 4, 4, 4, 1, -2, 4, 4, 0, -2, -8, -2, -2, -2, 4, -2, 0, 1, -2, 4, -2, -2, 0, 4, 0, 4, 4, -2, 4, -2, 4, -2, 0, 4, -8, -2, -2, 4, -8, -2, 0, -2, 4, -2, -2, 4, -8, -2, 0, 0
Offset: 1

Views

Author

Keywords

Comments

|a(n)| is the number of ways to write n as a product of 2 squarefree numbers (i.e., number of ways to write n = x*y with 1 <= x <= n, 1 <= y <= n, x and y squarefree). - Benoit Cloitre, Jan 01 2003

Examples

			G.f. = x - 2*x^2 - 2*x^3 + x^4 - 2*x^5 + 4*x^6 - 2*x^7 + x^9 + 4*x^10 + ...
We have a(3^1) = C(2, 1)*(-1)^1 = -2, a(3^2) = C(2, 2)*(-1)^2 = 1, and a(3^m) = C(2, m)*(-1)^m = 0 for m >= 3. - _Petros Hadjicostas_, Jun 07 2019
		

References

  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 30.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Dirichlet inverse of A000005, Mobius transform of A008683.

Programs

  • Haskell
    a007427 n = sum $ zipWith (*) mds $ reverse mds where
       mds = a225817_row n
    -- Reinhard Zumkeller, Jul 30 2013
    
  • Maple
    möbius := proc(a)  local b, i, mo: b := NULL:
    mo := (m,n) -> `if`(irem(m,n) = 0, numtheory:-mobius(m/n), 0);
    for i to nops(a) do b := b, add(mo(i,j)*a[j], j=1..i) od: [b] end:
    (möbius@@2)([1, seq(0, i=1..80)]); # Peter Luschny, Sep 08 2017
  • Mathematica
    f[n_] := Plus @@ Times @@@ (MoebiusMu[{#, n/#}] & /@ Divisors@n); Array[f, 105] (* Robert G. Wilson v *)
    a[n_] := DivisorSum[n, MoebiusMu[#]*MoebiusMu[n/#]&]; Array[a, 80] (* Jean-François Alcover, Dec 01 2015 *)
  • PARI
    {a(n) = if( n<1, 0, direuler(p=2, n, (1 - X)^2)[n])}; /* Michael Somos, Nov 15 2002 */
    
  • PARI
    {a(n) = if(n<1, 0, sumdiv(n, d, moebius(d) * moebius(n/d)))}; /* Michael Somos, Nov 15 2002 */
    
  • PARI
    a(n)=if(n>1,my(f=factor(n)[,2],s=sum(i=1,#f,f[i]==1));if(vecmax(f)>2,0,(-1)^s<Charles R Greathouse IV, Jun 28 2011
    
  • Python
    from math import prod, comb
    from sympy import factorint
    def A007427(n): return prod(-comb(2,e) if e&1 else comb(2,e) for e in factorint(n).values()) # Chai Wah Wu, Jul 05 2024

Formula

Dirichlet g.f.: 1/zeta(s)^2.
Multiplicative function with a(p^e) = binomial(2, e)*(-1)^e for p prime and e >= 0.
a(n) = Sum_{d|n} mu(d)*mu(n/d). - Benoit Cloitre, Apr 05 2002
a(n^2) = A008683(n)^2. a(A005117(n)) = (-2)^A001221(A005117(n)). - Enrique Pérez Herrero, Jun 27 2011 [Misrendering of contribution rectified by Peter Munn, Mar 06 2020]
a(n) is the Dirichlet inverse of A000005, which means a(n) = -Sum_{d|n, dA000005(n/d)*a(d). - Enrique Pérez Herrero, Jan 19 2013
a(n) = 0 if n is not cubefree: A046099, otherwise sign(a(n)) = lambda(n), where lambda is A008836. - Enrique Pérez Herrero, Jan 19 2013
Dirichlet g.f. of |a(n)|: zeta(s)^2/zeta(2s)^2 (conjectured). - Ralf Stephan, Jul 05 2013. The conjecture is correct because 1+Sum_{e>=1} binomial(2,e)/p^(e*s) = (p^s+1)^2/p^2s, whose product over p is zeta(s)^2/zeta(2s)^2. - Michael Shamos
a(n) = Sum_{k=1..A000005(n)} A225817(n,k)*A225817(n,n+1-k). - Reinhard Zumkeller, Jul 30 2013
G.f. A(x) satisfies: A(x) = x - Sum_{k>=2} tau(k)*A(x^k), where tau = A000005. - Ilya Gutkovskiy, May 11 2019
Sum_{k=1..n} abs(a(k)) ~ (n/zeta(2)^2) * (log(n) + 2*gamma - 1 - 4*zeta'(2)/zeta(2)), where gamma is Euler's constant (A001620). - Amiram Eldar, Dec 24 2023

Extensions

Added a proof of Stephan's conjecture about the Dirichlet g.f. of |a(n)|.

A048105 Number of non-unitary divisors of n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Number of zeros in row n of table A225817. - Reinhard Zumkeller, Jul 30 2013

Examples

			Example 1: If n is squarefree (A005117) then a(n)=0 since all divisors are unitary.
Example 2: n=12, d(n)=6, ud(n)=4, nud(12)=d(12)-ud(12)=2; from {1,2,3,4,6,12} {1,3,4,12} are unitary while {2,6} are not unitary divisors.
Example 3: n=p^k, a true prime power, d(n)=k+1, u(d)=2^r(x)=2, so nud(n)=d(p^k)-2=k+1 i.e., it can be arbitrarily large.
		

Crossrefs

Programs

  • Haskell
    a048105 n = length [d | d <- [1..n], mod n d == 0, gcd d (n `div` d) > 1]
    -- Reinhard Zumkeller, Aug 17 2011
    
  • Maple
    with(NumberTheory):
    seq(SumOfDivisors(n, 0) - 2^NumberOfPrimeFactors(n, 'distinct'), n = 1..105);
    # Peter Luschny, Jul 27 2023
  • Mathematica
    Table[DivisorSigma[0, n] - 2^PrimeNu[n], {n, 1, 50}] (* Geoffrey Critzer, Dec 10 2014 *)
  • PARI
    a(n)=my(f=factor(n)[,2]); prod(i=1,#f,f[i]+1)-2^#f \\ Charles R Greathouse IV, Sep 18 2015
    
  • Python
    from math import prod
    from sympy import factorint
    def A048105(n): return -(1<Chai Wah Wu, Aug 12 2024

Formula

a(n) = Sigma(0, n) - 2^r(n), where r() = A001221, the number of distinct primes dividing n.
From Reinhard Zumkeller, Jul 30 2013: (Start)
a(n) = A000005(n) - A034444(n).
For n > 1: a(n) = A000005(n) - 2 * A007875(n). (End)
Dirichlet g.f.: zeta(s)^2 - zeta(s)^2/zeta(2*s). - Geoffrey Critzer, Dec 10 2014
G.f.: Sum_{k>=1} (1 - mu(k)^2)*x^k/(1 - x^k). - Ilya Gutkovskiy, Apr 21 2017
Sum_{k=1..n} a(k) ~ (1-6/Pi^2)*n*log(n) + ((1-6/Pi^2)*(2*gamma-1)+(72*zeta'(2)/Pi^4))*n , where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 27 2022

A060594 Number of solutions to x^2 == 1 (mod n), that is, square roots of unity modulo n.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 2, 4, 2, 2, 2, 4, 2, 2, 4, 4, 2, 2, 2, 4, 4, 2, 2, 8, 2, 2, 2, 4, 2, 4, 2, 4, 4, 2, 4, 4, 2, 2, 4, 8, 2, 4, 2, 4, 4, 2, 2, 8, 2, 2, 4, 4, 2, 2, 4, 8, 4, 2, 2, 8, 2, 2, 4, 4, 4, 4, 2, 4, 4, 4, 2, 8, 2, 2, 4, 4, 4, 4, 2, 8, 2, 2, 2, 8, 4, 2, 4, 8, 2, 4, 4, 4, 4, 2, 4, 8, 2, 2, 4, 4, 2, 4, 2
Offset: 1

Views

Author

Jud McCranie, Apr 11 2001

Keywords

Comments

Sum_{k=1..n} a(k) appears to be asymptotic to C*n*log(n) with C = 0.6... - Benoit Cloitre, Aug 19 2002
a(q) is the number of real characters modulo q. - Benoit Cloitre, Feb 02 2003
Also number of real Dirichlet characters modulo n and Sum_{k=1..n}a(k) is asymptotic to (6/Pi^2)*n*log(n). - Steven Finch, Feb 16 2006
Let P(n) be the product of the numbers less than and coprime to n. By theorem 59 in Nagell (which is Gauss's generalization of Wilson's theorem): for n > 2, P == (-1)^(a(n)/2) (mod n). - T. D. Noe, May 22 2009
Shadow transform of A005563. - Michel Marcus, Jun 06 2013
For n > 2, a(n) = 2 iff n is in A033948. - Max Alekseyev, Jan 07 2015
For n > 1, number of square numbers on the main diagonal of an (n-1) X (n-1) square array whose elements are the numbers from 1..n^2, listed in increasing order by rows. - Wesley Ivan Hurt, May 19 2021
a(n) is the number of linear Alexander quandles (Z/nZ, k) that are kei (equivalently, that have good involutions); see Ta, Prop. 5.6 and cf. A387317. - Luc Ta, Aug 26 2025

Examples

			The four numbers 1^2, 3^2, 5^2 and 7^2 are congruent to 1 modulo 8, so a(8) = 4.
		

References

  • Trygve Nagell, Introduction to Number Theory, AMS Chelsea, 1981, p. 100. [From T. D. Noe, May 22 2009]
  • Gérald Tenenbaum, Introduction à la théorie analytique et probabiliste des nombres, Cours spécialisé, 1995, Collection SMF, p. 260.
  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, pp. 196-197.

Crossrefs

Cf. A000010, A005087, A033948, A046073, A073103 (x^4 == 1 (mod n)).
Cf. A387317.

Programs

  • Maple
    A060594 := proc(n)
       option remember;
       local a,b,c;
       if type(n,even) then
         a:= padic:-ordp(n,2);
         b:= 2^a;
         c:= n/b;
         min(b/2, 4) * procname(c)
       else
         2^nops(numtheory:-factorset(n))
       fi
    end proc:
    map(A060594, [$1 .. 100]); # Robert Israel, Jan 05 2015
  • Mathematica
    a[n_] := Sum[ Boole[ Mod[k^2 , n] == 1], {k, 1, n}]; a[1] = 1; Table[a[n], {n, 1, 103}] (* Jean-François Alcover, Oct 21 2011 *)
    a[n_] := Switch[Mod[n, 8], 2|6, 2^(PrimeNu[n]-1), 1|3|4|5|7, 2^PrimeNu[n], 0, 2^(PrimeNu[n]+1)]; Array[a, 103] (* Jean-François Alcover, Apr 09 2016 *)
  • PARI
    a(n)=sum(i=1,n,if((i^2-1)%n,0,1))
    
  • PARI
    a(n)=my(o=valuation(n,2));2^(omega(n>>o)+max(min(o-1,2),0)) \\ Charles R Greathouse IV, Jun 06 2013
    
  • PARI
    a(n)=if(n<=2, 1, 2^#znstar(n)[3] ); \\ Joerg Arndt, Jan 06 2015
    
  • Python
    from sympy import primefactors
    def a007814(n): return 1 + bin(n - 1).count('1') - bin(n).count('1')
    def a(n):
        if n%2==0:
            A=a007814(n)
            b=2**A
            c=n//b
            return min(b//2, 4)*a(c)
        else: return 2**len(primefactors(n))
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jul 18 2017, after the Maple program
    
  • Python
    from sympy import primefactors
    def A060594(n): return (1<>(s:=(~n & n-1).bit_length()))))*(1 if n&1 else 1<Chai Wah Wu, Oct 26 2022
  • Sage
    print([len(Integers(n).square_roots_of_one()) for n in range(1,100)]) # Ralf Stephan, Mar 30 2014
    

Formula

If n == 0 (mod 8), a(n) = 2^(A005087(n) + 2); if n == 4 (mod 8), a(n) = 2^(A005087(n) + 1); otherwise a(n) = 2^(A005087(n)). - Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 29 2001
a(n) = 2^omega(n)/2 if n == +/-2 (mod 8), a(n) = 2^omega(n) if n== +/-1, +/-3, 4 (mod 8), a(n) = 2*2^omega(n) if n == 0 (mod 8), where omega(n) = A001221(n). - Benoit Cloitre, Feb 02 2003
For n >= 2 A046073(n) * a(n) = A000010(n) = phi(n). This gives a formula for A046073(n) using the one in A060594(n). - Sharon Sela (sharonsela(AT)hotmail.com), Mar 09 2002
Multiplicative with a(2) = 1; a(2^2) = 2; a(2^e) = 4 for e > 2; a(q^e) = 2 for q an odd prime. - Eric M. Schmidt, Jul 09 2013
a(n) = 2^A046072(n) for n>2, in accordance with the above formulas by Ahmed Fares. - Geoffrey Critzer, Jan 05 2015
a(n) = Sum_{k=1..n} floor(sqrt(1+n*(k-1)))-floor(sqrt(n*(k-1))). - Wesley Ivan Hurt, May 19 2021
From Amiram Eldar, Dec 30 2022: (Start)
Dirichlet g.f.: (1-1/2^s+2/4^s)*zeta(s)^2/zeta(2*s).
Sum_{k=1..n} a(k) ~ (6/Pi^2)*n*(log(n) + 2*gamma - 1 - log(2)/2 - 2*zeta'(2)/zeta(2)), where gamma is Euler's constant (A001620). (End)

A018892 Number of ways to write 1/n as a sum of exactly 2 unit fractions.

Original entry on oeis.org

1, 2, 2, 3, 2, 5, 2, 4, 3, 5, 2, 8, 2, 5, 5, 5, 2, 8, 2, 8, 5, 5, 2, 11, 3, 5, 4, 8, 2, 14, 2, 6, 5, 5, 5, 13, 2, 5, 5, 11, 2, 14, 2, 8, 8, 5, 2, 14, 3, 8, 5, 8, 2, 11, 5, 11, 5, 5, 2, 23, 2, 5, 8, 7, 5, 14, 2, 8, 5, 14, 2, 18, 2, 5, 8, 8, 5, 14, 2, 14, 5, 5, 2, 23, 5, 5, 5, 11, 2, 23, 5, 8, 5, 5, 5, 17, 2, 8, 8
Offset: 1

Views

Author

Keywords

Comments

Number of elements in the set {(x,y): x|n, y|n, x<=y, gcd(x,y)=1}. Number of divisors of n^2 less than or equal to n. - Vladeta Jovovic, May 03 2002
Equivalently, number of pairs (x,y) such that lcm(x,y)=n. - Benoit Cloitre, May 16 2002
Also, number of right triangles with an integer hypotenuse and height n. - Reinhard Zumkeller, Jul 10 2002
The triangles are to be considered as resting on their hypotenuse, with the height measured to the right angle. - Franklin T. Adams-Watters, Feb 19 2015
a(n) >= 2 for n>=2 because of the identities 1/n = 1/(2*n) + 1/(2*n) = 1/(n+1) + 1/(n*(n+1)). - Lekraj Beedassy, May 04 2004
a(n) is the number of divisors of n^2 that are <= n; e.g., a(12) counts these 8 divisors of 12: 1,2,3,4,6,8,9,12. - Clark Kimberling, Apr 21 2019

Examples

			n=1: 1/1 = 1/2 + 1/2.
n=2: 1/2 = 1/4 + 1/4 = 1/3 + 1/6.
n=3: 1/3 = 1/6 + 1/6 = 1/4 + 1/12.
		

References

  • K. S. Brown, Posting to netnews group sci.math, Aug 17 1996.
  • L. E. Dickson, History of The Theory of Numbers, Vol. 2 p. 690, Chelsea NY 1923.
  • A. M. and I. M. Yaglom, Challenging Mathematical Problems With Elementary Solutions, Vol. 1, Dover, N.Y., 1987, pp. 8 and 60, Problem 19.

Crossrefs

Programs

  • Haskell
    a018892 n = length [d | d <- [1..n], n^2 `mod` d == 0]
    -- Reinhard Zumkeller, Jan 08 2012
    
  • Mathematica
    f[j_, n_] := (Times @@ (j(Last /@ FactorInteger[n]) + 1) + j - 1)/j; Table[f[2, n], {n, 96}] (* Robert G. Wilson v, Aug 03 2005 *)
    a[n_] := (DivisorSigma[0, n^2] + 1)/2; Table[a[n], {n, 1, 99}](* Jean-François Alcover, Dec 19 2011, after Vladeta Jovovic *)
  • PARI
    A018892(n)=(numdiv(n^2)+1)/2 \\ M. F. Hasler, Dec 30 2007
    
  • PARI
    A018892s(n)=local(t=divisors(n^2));vector((#t+1)/2,i,[n+t[i],n+n^2/t[i]]) /* show solutions */ \\ M. F. Hasler, Dec 30 2007
    
  • PARI
    a(n)=sumdiv(n,d,sum(i=1,d,lcm(d,i)==n)) \\ Charles R Greathouse IV, Apr 08 2012
    
  • Python
    from math import prod
    from sympy import factorint
    def A018892(n): return prod((a<<1)+1 for a in factorint(n).values())+1>>1 # Chai Wah Wu, Aug 20 2023

Formula

If n = (p1^a1)(p2^a2)...(pt^at), a(n) = ((2*a1 + 1)(2*a2 + 1) ... (2*at + 1) + 1)/2.
a(n) = (tau(n^2)+1)/2. - Vladeta Jovovic, May 03 2002
a(n) = A063647(n)+1 = A046079(2*n)+1. - Lekraj Beedassy, Dec 01 2003
a(n) = Sum_{d|n} phi(2^omega(d)), where phi is A000010 and omega is A001221. - Enrique Pérez Herrero, Apr 13 2012
a(n) = A000005(n) + A089233(n). - James Spahlinger, Feb 16 2016
a(n) = n + Sum_{i=1..n} sign(n^2 mod -i). - Wesley Ivan Hurt, Apr 07 2021
a(n) = Sum_{d|n} mu(n/d)*A184389(d). - Ridouane Oudra, Feb 22 2022
Sum_{k=1..n} a(k) ~ (n/(2*zeta(2)))*(log(n)^2/2 + log(n)*(3*gamma - 1) + 1 - 3*gamma + 3*gamma^2 - 3*gamma_1 + zeta(2) + (2 - 6*gamma - 2*log(n))*zeta'(2)/zeta(2) + (2*zeta'(2)/zeta(2))^2 - 2*zeta''(2)/zeta(2)), where gamma is Euler's constant (A001620) and gamma_1 is the first Stieltjes constant (A082633). - Amiram Eldar, Oct 03 2024

Extensions

More terms from David W. Wilson, Sep 15 1996
First example corrected by Jason Orendorff (jason.orendorff(AT)gmail.com), Jan 02 2009
Incorrect Mathematica program deleted by N. J. A. Sloane, Jul 08 2009

A063647 Number of ways to write 1/n as a difference of exactly 2 unit fractions.

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 1, 3, 2, 4, 1, 7, 1, 4, 4, 4, 1, 7, 1, 7, 4, 4, 1, 10, 2, 4, 3, 7, 1, 13, 1, 5, 4, 4, 4, 12, 1, 4, 4, 10, 1, 13, 1, 7, 7, 4, 1, 13, 2, 7, 4, 7, 1, 10, 4, 10, 4, 4, 1, 22, 1, 4, 7, 6, 4, 13, 1, 7, 4, 13, 1, 17, 1, 4, 7, 7, 4, 13, 1, 13, 4, 4, 1, 22, 4, 4, 4, 10, 1, 22, 4, 7, 4, 4, 4
Offset: 1

Views

Author

Henry Bottomley, Jul 23 2001

Keywords

Comments

Also number of ways to write 1/n as sum of exactly two distinct unit fractions. - Thomas L. York, Jan 11 2014
Also number of positive integers m such that 1/n + 1/m is a unit fraction. - Jon E. Schoenfield, Apr 17 2018
If 1/n = 1/b - 1/c then n = bc/(c-b) and 1/n = 1/(2n-b) + 1/(c+2n) (though it is also the case that 1/n = 1/(2n) + 1/(2n) equivalent to b = c = 0).
Also number of divisors of n^2 less than n. - Vladeta Jovovic, Aug 13 2001
Number of elements in the set {(x,y): x|n, y|n, xVladeta Jovovic, May 03 2002
Also number of positive integers of the form k*n/(k+n). - Benoit Cloitre, Jan 04 2002
This is similar to A062799, having the same first 29 terms. But they are different sequences.
If A001221(n) = omega(n) <= 2, then a(n) = A062799(n); if A001221(n) > 2, then a(n) > A062799(n). - Matthew Vandermast, Aug 25 2004
Number of r X s integer-sided rectangles such that r + s = 4n, r < s and (s - r) | (s * r). - Wesley Ivan Hurt, Apr 24 2020
Also number of integer-sided right triangles with 2n as a leg. Equivalent to the even indices of A046079. - Nathaniel C Beckman, May 14 2020; Jun 26 2020
a(n) is the number of positive integers k such that k+n divides k*n. - Thomas Ordowski, Dec 02 2024

Examples

			a(10) = 4 since 1/10 = 1/5 - 1/10 = 1/6 - 1/15 = 1/8 - 1/40 = 1/9 - 1/90.
a(12) = 7: the divisors of 12 are 1, 2, 3, 4, 6 and 12 and the decompositions are (1, 2), (1, 3), (1, 4), (1, 6), (1, 12), (2, 3), (3, 4).
		

Crossrefs

First twenty-nine terms identical to those of A062799.

Programs

  • Magma
    [(NumberOfDivisors(n^2)-1)/2 : n in [1..100]]; // Vincenzo Librandi, Apr 18 2018
  • Mathematica
    Table[(Length[Divisors[n^2]] - 1)/2, {n, 1, 100}]
    (DivisorSigma[0,Range[100]^2]-1)/2 (* Harvey P. Dale, Apr 15 2013 *)
  • PARI
    for(n=1,100,print1(sum(i=1,n^2,if((n*i)%(i+n),0,1)),","))
    
  • PARI
    a(n)=numdiv(n^2)\2 \\ Charles R Greathouse IV, Oct 03 2016
    

Formula

a(n) = (tau(n^2)-1)/2.
a(n) = A018892(n)-1. If n = (p1^a1)(p2^a2)...(pt^at), a(n) = ((2*a1+1)(2*a2+1)...(2*at+1)-1)/2.
If n is prime a(n)=1. Conjecture: (1/n)*Sum_{i=1..n} a(i) = C*log(n)*log(log(n)) + o(log(n)) with C=0.7... [The conjecture is false. See the plot and the asymptotic formula below. - Amiram Eldar, Oct 03 2024]
Bisection of A046079. - Lekraj Beedassy, Jul 09 2004
a(n) = Sum_{i=1..2*n-1} (1 - ceiling(i*(4*n-i)/(4*n-2*i)) + floor(i*(4*n-i)/(4*n-2*i))). - Wesley Ivan Hurt, Apr 24 2020
Sum_{k=1..n} a(k) ~ (n/(2*zeta(2)))*(log(n)^2/2 + log(n)*(3*gamma - 1) + 1 - 3*gamma + 3*gamma^2 - 3*gamma_1 - zeta(2) + (2 - 6*gamma - 2*log(n))*zeta'(2)/zeta(2) + (2*zeta'(2)/zeta(2))^2 - 2*zeta''(2)/zeta(2)), where gamma is Euler's constant (A001620) and gamma_1 is the first Stieltjes constant (A082633). - Amiram Eldar, Oct 03 2024

A327527 Number of uniform divisors of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Sep 17 2019

Keywords

Comments

A number is uniform if its prime multiplicities are all equal, meaning it is a power of a squarefree number. Uniform numbers are listed in A072774. The maximum uniform divisor of n is A327526(n).

Examples

			The uniform divisors of 40 are {1, 2, 4, 5, 8, 10}, so a(40) = 6.
		

Crossrefs

See link for additional cross-references.

Programs

  • Mathematica
    Table[Length[Select[Divisors[n],SameQ@@Last/@FactorInteger[#]&]],{n,100}]
    a[n_] := Module[{e = FactorInteger[n][[;; , 2]]}, 1 + Total[2^Accumulate[Count[e, #] & /@ Range[Max[e], 1, -1]] - 1]]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Dec 19 2023 *)
  • PARI
    isA072774(n) = { ispower(n, , &n); issquarefree(n); }; \\ From A072774
    A327527(n) = sumdiv(n,d,isA072774(d)); \\ Antti Karttunen, Nov 13 2021

Formula

From Amiram Eldar, Dec 19 2023: (Start)
a(n) = A034444(n) + A368251(n).
Sum_{k=1..n} a(k) ~ (n/zeta(2)) * (log(n) + 2*gamma - 1 - 2*zeta'(2)/zeta(2) + c * zeta(2)), where gamma is Euler's constant (A001620) and c = A368250. (End)

Extensions

Data section extended up to 105 terms by Antti Karttunen, Nov 13 2021

A304182 Number of primitive inequivalent mirror-symmetric sublattices of rectangular lattice of index n.

Original entry on oeis.org

1, 3, 2, 4, 2, 6, 2, 4, 2, 6, 2, 8, 2, 6, 4, 4, 2, 6, 2, 8, 4, 6, 2, 8, 2, 6, 2, 8, 2, 12, 2, 4, 4, 6, 4, 8, 2, 6, 4, 8, 2, 12, 2, 8, 4, 6, 2, 8, 2, 6, 4, 8, 2, 6, 4, 8, 4, 6, 2, 16, 2, 6, 4, 4, 4, 12, 2, 8, 4, 12, 2, 8, 2, 6, 4, 8, 4, 12, 2, 8, 2, 6, 2, 16, 4
Offset: 1

Views

Author

Andrey Zabolotskiy, May 07 2018

Keywords

Examples

			There are 6 = A001615(4) lattices in Z^2 whose quotient group is C_4. The reflection through an axis relates <(4,0), (1,1)> and <(4,0), (3,1)>. The remaining 4 = a(4) lattices are fixed.
		

Crossrefs

Cf. A069735 (not only primitive sublattices), A304183 (primitive oblique sublattices), A069734 (all sublattices).
Cf. other columns of tables 4 and 5 from [Rutherford, 2009]: A001615, A060594, A157223, A000089, A157224, A000086, A157227, A019590, A157228, A157226, A157230, A157231, A154272, A157235.

Programs

  • Mathematica
    f[p_, e_] := If[p == 2, If[e == 1, 3, 4], 2]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 22 2022 *)

Formula

From Álvar Ibeas, Mar 18 2021: (Start)
For n odd, a(n) = A034444(n) = 2^(A001221(n)).
For n even, a(n) = A034444(n) + A034444(n/2). If 4|n, a(n) = 2^(A001221(n) + 1); otherwise, a(n) = 3 * 2^(A001221(n) - 1).
Multiplicative with a(2) = 3, a(2^e) = 4 (for e>1), and a(p^e) = 2 (for p>2).
Dirichlet g.f.: (1+2^(-s)) * zeta(s)^2 / zeta(2s).
(End)
Sum_{k=1..n} a(k) ~ (log(n) + 2*gamma - log(2)/3 - 2*zeta'(2)/zeta(2) - 1)*9*n/Pi^2, where gamma is Euler's constant (A001620). - Amiram Eldar, Dec 31 2022

A055205 Number of nonsquare divisors of n^2.

Original entry on oeis.org

0, 1, 1, 2, 1, 5, 1, 3, 2, 5, 1, 9, 1, 5, 5, 4, 1, 9, 1, 9, 5, 5, 1, 13, 2, 5, 3, 9, 1, 19, 1, 5, 5, 5, 5, 16, 1, 5, 5, 13, 1, 19, 1, 9, 9, 5, 1, 17, 2, 9, 5, 9, 1, 13, 5, 13, 5, 5, 1, 33, 1, 5, 9, 6, 5, 19, 1, 9, 5, 19, 1, 23, 1, 5, 9, 9, 5, 19, 1, 17, 4, 5, 1, 33, 5, 5, 5, 13, 1, 33, 5, 9, 5, 5, 5
Offset: 1

Views

Author

Labos Elemer, Jun 19 2000

Keywords

Comments

Seems to be equal to the number of unordered pairs of coprime divisors of n. (Checked up to 2*10^14.) - Charles R Greathouse IV, May 03 2013
Outline of a proof for this observation, R. J. Mathar, May 05 2013: (Start)
i) To construct the divisors of n, write n=product_i p_i^e_i as the standard prime power decomposition, take any subset of the primes p_i (including the empty set representing the 1) and run with the associated list exponents from 0 up to their individual e_i.
To construct the *nonsquare* divisors of n, ensure that one or more of the associated exponents is/are odd. (The empty set is interpreted as 1^0 with even exponent.) To construct the nonsquare divisors of n^2, the principle remains the same, although the exponents may individually range from 0 up to 2*e_i.
The nonsquare divisor is therefore a nonempty product of prime powers (at least one) with odd exponents times a (potentially empty) product of prime powers (of different primes) with even exponents.
The nonsquare divisors of n^2 have exponents from 0 up to 2*e_i, but the subset of exponents in the "even/square" factor has e_i candidates (range 2, 4, .., 2*e_i) and in the "odd/nonsquare" factor also only e_i candidates (range 1,3,5,2*e_i-1).
ii) To construct the pairs of coprime divisors of n, take any two non-intersecting subsets of the set of p_i (possibly the empty subset which represents the factor 1), and let the exponents run from 1 up to their individual e_i in each of the two products.
iii) The bijection between the sets constructed in i) and ii) is given by mapping the two non-intersection prime sets onto each other, and observing that the numbers of compositions of exponents have the same orders in both cases.
(End)

Examples

			n = 8, d(64) = 7 and from the 7 divisors {1,4,16,64} are square and the remaining 3 = a(8).
n = 12, d(144) = 15, from which 6 divisors are squares {1,4,9,16,36,144} so a(12) = d(144)-d(12) = 9
a(60) = (number of terms of finite A171425) = 33. [_Reinhard Zumkeller_, Dec 08 2009]
		

Crossrefs

Programs

  • Haskell
    a055205 n = length [d | d <- [1..n^2], n^2 `mod` d == 0, a010052 d == 0]
    -- Reinhard Zumkeller, Aug 15 2011
    
  • Mathematica
    Table[Count[Divisors[n^2], d_ /;  ! IntegerQ[Sqrt[d]]], {n, 1, 95}] (* Jean-François Alcover, Mar 22 2011 *)
    Table[DivisorSigma[0,n^2]-DivisorSigma[0,n],{n,100}] (* Harvey P. Dale, Sep 02 2017 *)
  • PARI
    a(n)=my(f=factor(n)[,2]);prod(i=1,#f,2*f[i]+1)-prod(i=1,#f,f[i]+1) \\ Charles R Greathouse IV, May 02 2013

Formula

a(n) = A000005(n^2)-A000005(n) because the number of square divisors of n^2 equals the number of divisors of n.
a(n) = A056595(A000290(n)).
a(n) = A048691(n) - A000005(n). - Reinhard Zumkeller, Dec 08 2009
Sum_{k=1..n} a(k) ~ (n/zeta(2)) * (log(n)^2/2 + c_1 * log(n) + c_2), where c_1 = 3*gamma - 2*zeta'(2)/zeta(2) - zeta(2) - 1 = 0.226634..., c_2 = 3*gamma^2 - (2*gamma - 1)*zeta(2) - 3*gamma_1 + (1 - 3*gamma)*(2*zeta'(2)/zeta(2) + 1) + (2*zeta'(2)/zeta(2))^2 - 2*zeta''(2)/zeta(2) = -0.0529271..., gamma is Euler's constant (A001620), and gamma_1 is the first Stieltjes constant (A082633). - Amiram Eldar, Dec 01 2023

A383156 The sum of the maximum exponents in the prime factorizations of the divisors of n.

Original entry on oeis.org

0, 1, 1, 3, 1, 3, 1, 6, 3, 3, 1, 7, 1, 3, 3, 10, 1, 7, 1, 7, 3, 3, 1, 13, 3, 3, 6, 7, 1, 7, 1, 15, 3, 3, 3, 13, 1, 3, 3, 13, 1, 7, 1, 7, 7, 3, 1, 21, 3, 7, 3, 7, 1, 13, 3, 13, 3, 3, 1, 15, 1, 3, 7, 21, 3, 7, 1, 7, 3, 7, 1, 22, 1, 3, 7, 7, 3, 7, 1, 21, 10, 3, 1
Offset: 1

Views

Author

Amiram Eldar, Apr 18 2025

Keywords

Comments

Inverse Möbius transform of A051903.
a(n) depends only on the prime signature of n (A118914).

Examples

			4 has 3 divisors: 1, 2 = 2^1 and 4 = 2^2. The maximum exponents in their prime factorizations are 0, 1 and 2, respectively. Therefore, a(4) = 0 + 1 + 2 = 3.
12 has 6 divisors: 1, 2 = 2^1, 3 = 3^1, 4 = 2^2, 6 = 2 * 3 and 12 = 2^2 * 3. The maximum exponents in their prime factorizations are 0, 1, 1, 2, 1 and 2, respectively. Therefore, a(12) = 0 + 1 + 1 + 2 + 1 + 2 = 7.
		

Crossrefs

Programs

  • Mathematica
    emax[n_] := If[n == 1, 0, Max[FactorInteger[n][[;; , 2]]]]; a[n_] := DivisorSum[n, emax[#] &]; Array[a, 100]
    (* second program: *)
    a[n_] := If[n == 1, 0, Module[{e = FactorInteger[n][[;; , 2]], emax, v}, emax = Max[e]; v = Table[Times @@ (Min[# + 1, k + 1] & /@ e), {k, 1, emax}]; v[[1]] + Sum[k*(v[[k]] - v[[k - 1]]), {k, 2, emax}] - 1]]; Array[a, 100]
  • PARI
    emax(n) = if(n == 1, 0, vecmax(factor(n)[,2]));
    a(n) = sumdiv(n, d, emax(d));
    
  • PARI
    a(n) = if(n == 1, 0, my(e = factor(n)[, 2], emax = vecmax(e), v); v = vector(emax, k, vecprod(apply(x ->min(x+1 , k+1), e))); v[1] + sum(k = 2, emax, k * (v[k]-v[k-1])) - 1);

Formula

a(n) = Sum_{d|n} A051903(d).
a(n) = A000005(n) * A383157(n)/A383158(n).
a(p^e) = e*(e+1)/2 for prime p and e >= 0. In particular, a(p) = 1 for prime p.
a(n) = 2^omega(n) - 1 = A309307(n) if n is squarefree (A005117).
a(n) = tau(n, 2) - 1 + Sum_{k=2..A051903(n)} k * (tau(n, k+1) - tau(n, k)), where tau(n, k) is the number of k-free divisors of n (k-free numbers are numbers that are not divisible by a k-th power other than 1). For a given k >= 2, tau(n, k) is a multiplicative function with tau(p^e, k) = min(e+1, k). E.g., tau(n, 2) = A034444(n), tau(n, 3) = A073184(n), and tau(n, 4) = A252505(n).
Sum_{k=1..n} a(k) ~ c_1 * n * log(n) + c_2 * n, where c_1 is Niven's constant (A033150), c_2 = -1 + (2*gamma - 1)*c_1 - 2*zeta'(2)/zeta(2)^2 - Sum_{k>=3} (k-1) * (k*zeta'(k)/zeta(k)^2 - (k-1)*zeta'(k-1)/zeta(k-1)^2) = -2.37613633493572231366..., and gamma is Euler's constant (A001620).

A124315 a(n) = Sum_{ d divides n } tau(gcd(d,n/d)), where tau = sigma_0 = A000005.

Original entry on oeis.org

1, 2, 2, 4, 2, 4, 2, 6, 4, 4, 2, 8, 2, 4, 4, 9, 2, 8, 2, 8, 4, 4, 2, 12, 4, 4, 6, 8, 2, 8, 2, 12, 4, 4, 4, 16, 2, 4, 4, 12, 2, 8, 2, 8, 8, 4, 2, 18, 4, 8, 4, 8, 2, 12, 4, 12, 4, 4, 2, 16, 2, 4, 8, 16, 4, 8, 2, 8, 4, 8, 2, 24, 2, 4, 8, 8, 4, 8, 2, 18, 9, 4, 2, 16, 4, 4, 4, 12, 2, 16, 4, 8, 4, 4, 4, 24, 2, 8
Offset: 1

Views

Author

Robert G. Wilson v, Sep 30 2006

Keywords

Comments

Apparently the Mobius transform of A046951. - R. J. Mathar, Feb 07 2011
Number of ordered pairs of divisors of n, (d1,d2), with d1<=d2, such that d1|d2 and n|(d1*d2). - Wesley Ivan Hurt, Mar 22 2022

Crossrefs

Programs

  • Maple
    A124315 := proc(n) local a,d; a := 0 ; for d in numtheory[divisors](n) do igcd(d,n/d) ; a := a+numtheory[tau](%) ; end do: a; end proc: # R. J. Mathar, Apr 14 2011
  • Mathematica
    Table[Plus @@ Map[DivisorSigma[0, GCD[ #, n/# ]] &, Divisors@n], {n, 98}]
    f[p_, e_] := e + 1 + Floor[e^2/4]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Apr 10 2022 *)
  • PARI
    a(n) = sumdiv(n, d, numdiv(gcd(d, n/d))); \\ Michel Marcus, Feb 12 2016
    
  • Python
    from sympy import divisors, divisor_count, gcd
    def a(n): return sum([divisor_count(gcd(d, n/d)) for d in divisors(n)]) # Indranil Ghosh, May 25 2017

Formula

a(p) = 2 iff p is a prime.
Multiplicative with a(p^e) = e+1+floor(e^2/4). - R. J. Mathar, Apr 14 2011
Dirichlet g.f.: zeta(s)^2 * zeta(2*s). - Vaclav Kotesovec, Jan 11 2019
Sum_{k=1..n} a(k) ~ (Pi^2/6) * (n*log(n) + (2*gamma - 1 + 2*zeta'(2)/zeta(2))*n), where gamma is Euler's constant (A001620). - Amiram Eldar, Oct 22 2022
Showing 1-10 of 44 results. Next