cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 22 results. Next

A130106 A051731 * diagonalized matrix of A063659.

Original entry on oeis.org

1, 1, 2, 1, 0, 3, 1, 2, 0, 3, 1, 0, 0, 0, 5, 1, 2, 3, 0, 0, 6, 1, 0, 0, 0, 0, 0, 7, 1, 2, 0, 3, 0, 0, 0, 6, 1, 0, 3, 0, 0, 0, 0, 0, 8, 1, 2, 0, 0, 5, 0, 0, 0, 0, 10, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 1, 2, 3, 3, 0, 6, 0, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 1, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 14
Offset: 1

Views

Author

Gary W. Adamson, May 07 2007

Keywords

Comments

Right border = A063659, (1, 2, 3, 3, 5, 6, 7, 6, 8, 10, ...), the Moebius transform of A001615: (1, 3, 4, 6, 6, 12, 8, 12, 12, ...).
A130106 * (1, 2, 3, ...) = A034676: (1, 5, 10, 17, 26, 50, 50, ...).
A034676^(-1) * (1,2,3,...) = 1/1, 1/2, 2/3, 2/3, 4/5, 2/6, 6/7, 4/6, 6/8, 4/10, ...; where the numerators = phi(n), A000010: (1, 1, 2, 2, 4, 2, 6, 4, ...); and the denominators = A063659, the right border of the triangle: (1, 2, 3, 3, 5, 6, 7, 8, 10, ...).

Examples

			First few rows of the triangle:
  1;
  1, 2;
  1, 0, 3;
  1, 2, 0, 3;
  1, 0, 0, 0, 5;
  1, 2, 3, 0, 0, 6;
  1, 0, 0, 0, 0, 0, 7,
  1, 2, 0, 3, 0, 0, 0, 6;
  1, 0, 3, 0, 0, 0, 0, 0, 8;
  ...
		

Crossrefs

Cf. A063659, A001615 (row sums), A051731, A000010.

Programs

  • Mathematica
    m = 14;
    A051731 = Table[If[Mod[n, k] == 0, 1, 0], {n, m}, {k, m}];
    A063659 = Table[Sum[MoebiusMu[GCD[n, k]]^2, {k, n}], {n, m}] // DiagonalMatrix;
    M = A051731.A063659;
    Table[M[[n, k]], {n, m}, {k, n}] // Flatten (* Jean-François Alcover, Jan 18 2020 *)

Formula

Inverse Moebius transform of an infinite lower triangular matrix with A063659, (1, 2, 3, 3, 5, 6, 7, 6, 8, 10, ...) in the main diagonal and the rest zeros.

Extensions

More terms from Jean-François Alcover, Jan 18 2020

A130107 Möbius transform of A063659.

Original entry on oeis.org

1, 1, 2, 1, 4, 2, 6, 3, 5, 4, 10, 2, 12, 6, 8, 6, 16, 5, 18, 4, 12, 10, 22, 6, 19, 12, 16, 6, 28, 8, 30, 12, 20, 16, 24, 5, 36, 18, 24, 12, 40, 12, 42, 10, 20, 22, 46, 12, 41, 19, 32, 12, 52, 16, 40, 18, 36, 28, 58, 8, 60, 30, 30, 24, 48, 20, 66, 16, 44, 24
Offset: 1

Views

Author

Gary W. Adamson, May 07 2007

Keywords

Comments

Double inverse Möbius transform of A130107 = A001615: (1, 3, 4, 6, 6, 12, 8, 12, 12, 18, 12, ...).

Examples

			G.f. = x + x^2 + 2*x^3 + x^4 + 4*x^5 + 2*x^6 + 6*x^7 + 3*x^8 + 5*x^9 + ...
		

Crossrefs

Programs

  • Maple
    with(numtheory): A130107 := proc(n) local dp, mtdp, d, p;
    dp := n -> n*mul((1+1/p), p=factorset(n));
    mtdp := n -> add(mobius(n/d)*dp(d), d=divisors(n));
    add(mobius(n/d)*mtdp(d), d=divisors(n)) end:
    seq(A130107(n), n=1..76); # Peter Luschny, Apr 06 2014
  • Mathematica
    JordanTotient[n_,k_:1]:=DivisorSum[n,#^k*MoebiusMu[n/#]&]/;(n>0)&&IntegerQ[n];
    DedekindPsi[n_]:=JordanTotient[n,2]/EulerPhi[n];
    A063659[n_]:=DivisorSum[n,MoebiusMu[n/#]*DedekindPsi[#]&];
    A130107[n_]:=DivisorSum[n,MoebiusMu[n/#]*A063659[#]&]:
    Table[A130107[n],{n,1,30}]
    (* Enrique Pérez Herrero, Apr 03 2014 *)
    a[ n_] := If[ n < 2, Boole[n == 1], Times @@ (Which[ #2 == 1, # - 1, #2 == 2, #^2 - # - 1, True, #^(#2 - 3) (#^2 - 1) (# - 1)] &) @@@ FactorInteger[n]]; (* Michael Somos, Jun 17 2015 *)
  • PARI
    {a(n) = my(A, p, e); if( n<1, 0, A = factor(n); prod(k=1, matsize(A)[1], [p, e] = A[k,]; if( e==1, p - 1, e==2, p^2 - p - 1, p^(e-3) * (p^2 - 1) * (p-1))))}; /* Michael Somos, Jun 17 2015 */

Formula

A054525 * A063659, (1, 2, 3, 3, 5, 6, 7, 6, 8, 10, ...).
Multiplicative with a(p^e) = p-1 if e=1, a(p^e) = p^2-p-1 if e=2, a(p^e) = p^(e-3)*(p+1)*(p-1)^2. - Enrique Pérez Herrero, Apr 03 2014
Dirichlet g.f.: zeta(s-1) / (zeta(s) * zeta(2s)). - Álvar Ibeas, Mar 07 2015
Sum_{k=1..n} a(k) ~ 270*n^2 / Pi^6. - Vaclav Kotesovec, Jan 11 2019

Extensions

More terms from Enrique Pérez Herrero, Apr 03 2014

A336673 Numbers k such that A063659(k) = A063659(k+1).

Original entry on oeis.org

3, 49, 1681, 18490, 23762, 656914, 843637, 5606230, 35558770, 46297822, 59006794, 114594493, 132859642, 138852445, 157906534, 289405462, 299441785, 536671282, 813736930, 1175272581, 1276553470, 1655870629, 5086602202, 5429407657, 6549516022, 8645559934, 10373399185
Offset: 1

Views

Author

Amiram Eldar, Jul 29 2020

Keywords

Comments

Analogous to A001274 as A063659 is analogous to Euler's phi function (A000010).

Examples

			3 is a term since A063659(3) = A063659(4) = 3.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[e == 1, p, p^e - p^(e-2)]; s[n_] := Times @@ f @@@ FactorInteger[n]; s1 = 1; seq = {}; Do[s2 = s[n]; If[s1 == s2, AppendTo[seq, n-1]]; s1 = s2, {n, 2, 10^5}]; seq

A140694 a(n) = A014963(n) * A063659(n).

Original entry on oeis.org

1, 4, 9, 6, 25, 6, 49, 12, 24, 10, 121, 9, 169, 14, 15, 24, 289, 16, 361, 15, 21, 22, 529, 18, 120, 26, 72, 21, 841, 30, 961, 48, 33, 34, 35, 24, 1369, 38, 39, 30, 1681, 42, 1849, 33, 40, 46, 2209, 36, 336, 48, 51, 39, 2809, 48, 55, 42, 57, 58, 3481, 45, 3721
Offset: 1

Views

Author

Gary W. Adamson and Mats Granvik, May 23 2008

Keywords

Comments

A140579 as an infinite lower triangular matrix * A063659 as a vector.

Examples

			a(4) = A014963(4) * A063659(4) = 2 * 3  = 6.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[e == 1, p, p^e - p^(e - 2)]; a[n_] := Exp[MangoldtLambda[n]] * Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, May 18 2025 *)

Formula

a(n) = n^2 iff n is prime.
a(n) = n iff mu(n) = 1.

Extensions

More terms from Amiram Eldar, May 18 2025

A001615 Dedekind psi function: n * Product_{p|n, p prime} (1 + 1/p).

Original entry on oeis.org

1, 3, 4, 6, 6, 12, 8, 12, 12, 18, 12, 24, 14, 24, 24, 24, 18, 36, 20, 36, 32, 36, 24, 48, 30, 42, 36, 48, 30, 72, 32, 48, 48, 54, 48, 72, 38, 60, 56, 72, 42, 96, 44, 72, 72, 72, 48, 96, 56, 90, 72, 84, 54, 108, 72, 96, 80, 90, 60, 144, 62, 96, 96, 96, 84, 144, 68, 108, 96
Offset: 1

Views

Author

Keywords

Comments

Number of primitive sublattices of index n in generic 2-dimensional lattice; also index of Gamma_0(n) in SL_2(Z).
A generic 2-dimensional lattice L = consists of all vectors of the form mV + nW, (m,n integers). A sublattice S = has index |ad-bc| and is primitive if gcd(a,b,c,d) = 1. The generic lattice L has precisely a(2) = 3 sublattices of index 2, namely <2V,W>, and (which = ) and so on for other indices.
The sublattices of index n are in 1-to-1 correspondence with matrices [a b; 0 d] with a>0, ad=n, b in [0..d-1]. The number of these is Sum_{d|n} = sigma(n), which is A000203. A sublattice is primitive if gcd(a,b,d) = 1; the number of these is n * product_{p|n} (1+1/p), which is the present sequence.
SL_2(Z) = Gamma is the group of all 2 X 2 matrices [a b; c d] where a,b,c,d are integers with ad-bc = 1 and Gamma_0(N) is usually defined as the subgroup of this for which N|c. But conceptually Gamma is best thought of as the group of (positive) automorphisms of a lattice , its typical element taking V -> aV + bW, W -> cV + dW and then Gamma_0(N) can be defined as the subgroup consisting of the automorphisms that fix the sublattice of index N. - J. H. Conway, May 05 2001
Dedekind proved that if n = k_i*j_i for i in I represents all the ways to write n as a product, and e_i=gcd(k_i,j_i), then a(n)= sum(k_i / (e_i * phi(e_i)), i in I ) [cf. Dickson, History of the Theory of Numbers, Vol. 1, p. 123].
Also a(n)= number of cyclic subgroups of order n in an Abelian group of order n^2 and type (1,1) (Fricke). - Len Smiley, Dec 04 2001
The polynomial degree of the classical modular equation of degree n relating j(z) and j(nz) is psi(n) (Fricke). - Michael Somos, Nov 10 2006; clarified by Katherine E. Stange, Mar 11 2022
The Mobius transform of this sequence is A063659. - Gary W. Adamson, May 23 2008
The inverse Mobius transform of this sequence is A060648. - Vladeta Jovovic, Apr 05 2009
The Dirichlet inverse of this sequence is A008836(n) * A048250(n). - Álvar Ibeas, Mar 18 2015
The Riemann Hypothesis is true if and only if a(n)/n - e^gamma*log(log(n)) < 0 for any n > 30. - Enrique Pérez Herrero, Jul 12 2011
The Riemann Hypothesis is also equivalent to another inequality, see the Sole and Planat link. - Thomas Ordowski, May 28 2017
An infinitary analog of this sequence is the sum of the infinitary divisors of n (see A049417). - Vladimir Shevelev, Apr 01 2014
Problem: are there composite numbers n such that n+1 divides psi(n)? - Thomas Ordowski, May 21 2017
The sum of divisors d of n such that n/d is squarefree. - Amiram Eldar, Jan 11 2019
Psi(n)/n is a new maximum for each primorial (A002110) [proof in link: Patrick Sole and Michel Planat, Proposition 1 page 2]. - Bernard Schott, May 21 2020
From Jianing Song, Nov 05 2022: (Start)
a(n) is the number of subgroups of C_n X C_n that are isomorphic to C_n, where C_n is the cyclic group of order n. Proof: the number of elements of order n in C_n X C_n is A007434(n) (they are the elements of the form (a,b) in C_n X C_n where gcd(a,b,n) = 1), and each subgroup isomorphic to C_n contains phi(n) generators, so the number of such subgroups is A007434(n)/phi(n) = a(n).
The total number of order-n subgroups of C_n X C_n is A000203(n). (End)

Examples

			Let L = <V,W> be a 2-dimensional lattice. The 6 primitive sublattices of index 4 are generated by <4V,W>, <V,4W>, <4V,W+-V>, <2V+W,2W>, <2V,2W+V>. Compare A000203.
G.f. = x + 3*x^2 + 4*x^3 + 6*x^4 + 6*x^5 + 12*x^6 + 8*x^7 + 12*x^8 + 12*x^9 + ...
		

References

  • Tom Apostol, Intro. to Analyt. Number Theory, page 71, Problem 11, where this is called phi_1(n).
  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989, p. 228.
  • R. Fricke, Die elliptischen Funktionen und ihre Anwendungen, Teubner, 1922, Vol. 2, see p. 220.
  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004. See Section B41, p. 147.
  • B. Schoeneberg, Elliptic Modular Functions, Springer-Verlag, NY, 1974, p. 79.
  • G. Shimura, Introduction to the Arithmetic Theory of Automorphic Functions, Princeton, 1971, see p. 25, Eq. (1).
  • 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

Other sequences that count lattices/sublattices: A000203 (with primitive condition removed), A003050 (hexagonal lattice instead), A003051, A054345, A160889, A160891.
Cf. A301594.
Cf. A063659 (Möbius transform), A082020 (average order), A156303 (Euler transform), A173290 (partial sums), A175836 (partial products), A203444 (range).
Cf. A210523 (record values).
Algebraic combinations with other core sequences: A000082, A033196, A175732, A291784, A344695.
Sequences of the form n^k * Product_ {p|n, p prime} (1 + 1/p^k) for k=0..10: A034444 (k=0), this sequence (k=1), A065958 (k=2), A065959 (k=3), A065960 (k=4), A351300 (k=5), A351301 (k=6), A351302 (k=7), A351303 (k=8), A351304 (k=9), A351305 (k=10).
Cf. A082695 (Dgf at s=3), A339925 (Dgf at s=4).

Programs

  • Haskell
    import Data.Ratio (numerator)
    a001615 n = numerator (fromIntegral n * (product $
                map ((+ 1) . recip . fromIntegral) $ a027748_row n))
    -- Reinhard Zumkeller, Jun 03 2013, Apr 12 2012
    
  • Magma
    m:=75; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( (&+[MoebiusMu(k)^2*x^k/(1-x^k)^2: k in [1..2*m]]) )); // G. C. Greubel, Nov 23 2018
    
  • Maple
    A001615 := proc(n) n*mul((1+1/i[1]),i=ifactors(n)[2]) end; # Mark van Hoeij, Apr 18 2012
  • Mathematica
    Join[{1}, Table[n Times @@ (1 + 1/Transpose[FactorInteger[n]][[1]]), {n, 2, 100}]] (* T. D. Noe, Jun 11 2006 *)
    Table[DirichletConvolve[j, MoebiusMu[j]^2, j, n], {n, 100}] (* Jan Mangaldan, Aug 22 2013 *)
    a[n_] := n Sum[MoebiusMu[d]^2/d, {d, Divisors[n]}]; (* Michael Somos, Jan 10 2015 *)
    Table[n Product[1 + 1/p, {p, Select[Divisors[n], PrimeQ]}], {n, 1, 100}] (* Vaclav Kotesovec, May 08 2021 *)
    Table[n DivisorSum[n, MoebiusMu[#]^2/# &], {n, 20}] (* Eric W. Weisstein, Mar 09 2025 *)
  • PARI
    {a(n) = if( n<1, 0, direuler( p=2, n, (1 + X) / (1 - p*X)) [n])};
    
  • PARI
    {a(n) = if( n<1, 0, n * sumdiv( n, d, moebius(d)^2 / d))}; /* Michael Somos, Nov 10 2006 */
    
  • PARI
    a(n)=my(f=factor(n)); prod(i=1,#f~, f[i,1]^f[i,2] + f[i,1]^(f[i,2]-1)) \\ Charles R Greathouse IV, Aug 22 2013
    
  • PARI
    a(n) = n * sumdivmult(n, d, issquarefree(d)/d) \\ Charles R Greathouse IV, Sep 09 2014
    
  • Python
    from math import prod
    from sympy import primefactors
    def A001615(n):
        plist = primefactors(n)
        return n*prod(p+1 for p in plist)//prod(plist) # Chai Wah Wu, Jun 03 2021
  • Sage
    def A001615(n) : return n*mul(1+1/p for p in prime_divisors(n))
    [A001615(n) for n in (1..69)] # Peter Luschny, Jun 10 2012
    

Formula

Dirichlet g.f.: zeta(s) * zeta(s-1) / zeta(2*s). - Michael Somos, May 19 2000
Multiplicative with a(p^e) = (p+1)*p^(e-1). - David W. Wilson, Aug 01 2001
a(n) = A003557(n)*A048250(n) = n*A000203(A007947(n))/A007947(n). - Labos Elemer, Dec 04 2001
a(n) = n*Sum_{d|n} mu(d)^2/d, Dirichlet convolution of A008966 and A000027. - Benoit Cloitre, Apr 07 2002
a(n) = Sum_{d|n} mu(n/d)^2 * d. - Joerg Arndt, Jul 06 2011
From Enrique Pérez Herrero, Aug 22 2010: (Start)
a(n) = J_2(n)/J_1(n) = J_2(n)/phi(n) = A007434(n)/A000010(n), where J_k is the k-th Jordan Totient Function.
a(n) = (1/phi(n))*Sum_{d|n} mu(n/d)*d^(b-1), for b=3. (End)
a(n) = n / Sum_{d|n} mu(d)/a(d). - Enrique Pérez Herrero, Jun 06 2012
a(n^k)= n^(k-1) * a(n). - Enrique Pérez Herrero, Jan 05 2013
If n is squarefree, then a(n) = A049417(n) = A000203(n). - Vladimir Shevelev, Apr 01 2014
a(n) = Sum_{d^2 | n} mu(d) * A000203(n/d^2). - Álvar Ibeas, Dec 20 2014
The average order of a(n) is 15*n/Pi^2. - Enrique Pérez Herrero, Jan 14 2012. See Apostol. - N. J. A. Sloane, Sep 04 2017
G.f.: Sum_{k>=1} mu(k)^2*x^k/(1 - x^k)^2. - Ilya Gutkovskiy, Oct 25 2018
a(n) = Sum_{d|n} 2^omega(d) * phi(n/d), Dirichlet convolution of A034444 and A000010. - Daniel Suteu, Mar 09 2019
From Richard L. Ollerton, May 07 2021: (Start)
a(n) = Sum_{k=1..n} 2^omega(gcd(n,k)).
a(n) = Sum_{k=1..n} 2^omega(n/gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)). (End)
a(n) = abs(A158523(n)) = A158523(n) * A008836(n). - Enrique Pérez Herrero, Nov 07 2022
a(n) = (1/n) * Sum_{d|n} mu(n/d)*sigma(d^2). - Ridouane Oudra, Mar 26 2025

Extensions

More terms from Olivier Gérard, Aug 15 1997

A007913 Squarefree part of n: a(n) is the smallest positive number m such that n/m is a square.

Original entry on oeis.org

1, 2, 3, 1, 5, 6, 7, 2, 1, 10, 11, 3, 13, 14, 15, 1, 17, 2, 19, 5, 21, 22, 23, 6, 1, 26, 3, 7, 29, 30, 31, 2, 33, 34, 35, 1, 37, 38, 39, 10, 41, 42, 43, 11, 5, 46, 47, 3, 1, 2, 51, 13, 53, 6, 55, 14, 57, 58, 59, 15, 61, 62, 7, 1, 65, 66, 67, 17, 69, 70, 71, 2, 73, 74, 3, 19, 77
Offset: 1

Views

Author

R. Muller, Mar 15 1996

Keywords

Comments

Also called core(n). [Not to be confused with the squarefree kernel of n, A007947.]
Sequence read mod 4 gives A065882. - Philippe Deléham, Mar 28 2004
This is an arithmetic function and is undefined if n <= 0.
A note on square roots of numbers: we can write sqrt(n) = b*sqrt(c) where c is squarefree. Then b = A000188(n) is the "inner square root" of n, c = A007913(n), lcm(A007947(b),c) = A007947(n) = "squarefree kernel" of n and bc = A019554(n) = "outer square root" of n. [Corrected by M. F. Hasler, Mar 01 2018]
If n > 1, the quantity f(n) = log(n/core(n))/log(n) satisfies 0 <= f(n) <= 1; f(n) = 0 when n is squarefree and f(n) = 1 when n is a perfect square. One can define n as being "epsilon-almost squarefree" if f(n) < epsilon. - Kurt Foster (drsardonicus(AT)earthlink.net), Jun 28 2008
a(n) is the smallest natural number m such that product of geometric mean of the divisors of n and geometric mean of the divisors of m are integers. Geometric mean of the divisors of number n is real number b(n) = Sqrt(n). a(n) = 1 for infinitely many n. a(n) = 1 for numbers from A000290: a(A000290(n)) = 1. For n = 8; b(8) = sqrt(8), a(n) = 2 because b(2) = sqrt(2); sqrt(8) * sqrt(2) = 4 (integer). - Jaroslav Krizek, Apr 26 2010
Dirichlet convolution of A010052 with the sequence of absolute values of A055615. - R. J. Mathar, Feb 11 2011
Booker, Hiary, & Keating outline a method for bounding (on the GRH) a(n) for large n using L-functions. - Charles R Greathouse IV, Feb 01 2013
According to the formula a(n) = n/A000188(n)^2, the scatterplot exhibits the straight lines y=x, y=x/4, y=x/9, ..., i.e., y=x/k^2 for all k=1,2,3,... - M. F. Hasler, May 08 2014
The Dirichlet inverse of this sequence is A008836(n) * A063659(n). - Álvar Ibeas, Mar 19 2015
a(n) = 1 if n is a square, a(n) = n if n is a product of distinct primes. - Zak Seidov, Jan 30 2016
All solutions of the Diophantine equation n*x=y^2 or, equivalently, G(n,x)=y, with G being the geometric mean, are of the form x=k^2*a(n), y=k*sqrt(n*a(n)), where k is a positive integer. - Stanislav Sykora, Feb 03 2016
If f is a multiplicative function then Sum_{d divides n} f(a(d)) is also multiplicative. For example, A010052(n) = Sum_{d divides n} mu(a(d)) and A046951(n) = Sum_{d divides n} mu(a(d)^2). - Peter Bala, Jan 24 2024

Crossrefs

See A000188, A007947, A008833, A019554, A117811 for related information, specific to n.
See A027746, A027748, A124010 for factorization data for n.
Analogous sequences: A050985, A053165, A055231.
Cf. A002734, A005117 (range of values), A059897, A069891 (partial sums), A090699, A350389.
Related to A006519 via A225546.

Programs

  • Haskell
    a007913 n = product $
                zipWith (^) (a027748_row n) (map (`mod` 2) $ a124010_row n)
    -- Reinhard Zumkeller, Jul 06 2012
    
  • Magma
    [ Squarefree(n) : n in [1..256] ]; // N. J. A. Sloane, Dec 23 2006
    
  • Maple
    A007913 := proc(n) local f,a,d; f := ifactors(n)[2] ; a := 1 ; for d in f do if type(op(2,d),'odd') then a := a*op(1,d) ; end if; end do: a; end proc: # R. J. Mathar, Mar 18 2011
    # second Maple program:
    a:= n-> mul(i[1]^irem(i[2], 2), i=ifactors(n)[2]):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jul 20 2015
    seq(n / expand(numtheory:-nthpow(n, 2)), n=1..77);  # Peter Luschny, Jul 12 2022
  • Mathematica
    data = Table[Sqrt[n], {n, 1, 100}]; sp = data /. Sqrt[] -> 1; sfp = data/sp /. Sqrt[x] -> x (* Artur Jasinski, Nov 03 2008 *)
    Table[Times@@Power@@@({#[[1]],Mod[ #[[2]],2]}&/@FactorInteger[n]),{n,100}] (* Zak Seidov, Apr 08 2009 *)
    Table[{p, e} = Transpose[FactorInteger[n]]; Times @@ (p^Mod[e, 2]), {n, 100}] (* T. D. Noe, May 20 2013 *)
    Sqrt[#] /. (c_:1)*a_^(b_:0) -> (c*a^b)^2& /@ Range@100 (* Bill Gosper, Jul 18 2015 *)
  • PARI
    a(n)=core(n)
    
  • Python
    from sympy import factorint, prod
    def A007913(n):
        return prod(p for p, e in factorint(n).items() if e % 2)
    # Chai Wah Wu, Feb 03 2015
    
  • Sage
    [squarefree_part(n) for n in (1..77)] # Peter Luschny, Feb 04 2015

Formula

Multiplicative with a(p^k) = p^(k mod 2). - David W. Wilson, Aug 01 2001
a(n) modulo 2 = A035263(n); a(A036554(n)) is even; a(A003159(n)) is odd. - Philippe Deléham, Mar 28 2004
Dirichlet g.f.: zeta(2s)*zeta(s-1)/zeta(2s-2). - R. J. Mathar, Feb 11 2011
a(n) = n/( Sum_{k=1..n} floor(k^2/n)-floor((k^2 -1)/n) )^2. - Anthony Browne, Jun 06 2016
a(n) = rad(n)/a(n/rad(n)), where rad = A007947. This recurrence relation together with a(1) = 1 generate the sequence. - Velin Yanev, Sep 19 2017
From Peter Munn, Nov 18 2019: (Start)
a(k*m) = A059897(a(k), a(m)).
a(n) = n / A008833(n).
(End)
a(A225546(n)) = A225546(A006519(n)). - Peter Munn, Jan 04 2020
From Amiram Eldar, Mar 14 2021: (Start)
Theorems proven by Copil and Panaitopol (2007):
Lim sup_{n->oo} a(n+1)-a(n) = oo.
Lim inf_{n->oo} a(n+1)-a(n) = -oo.
Sum_{k=1..n} 1/a(k) ~ c*sqrt(n) + O(log(n)), where c = zeta(3/2)/zeta(3) (A090699). (End)
a(n) = A019554(n)^2/n. - Jianing Song, May 08 2022
Sum_{k=1..n} a(k) ~ c * n^2, where c = Pi^2/30 = 0.328986... . - Amiram Eldar, Oct 25 2022
a(n) = A007947(A350389(n)). - Amiram Eldar, Jan 20 2024

Extensions

More terms from Michael Somos, Nov 24 2001
Definition reformulated by Daniel Forgues, Mar 24 2009

A384048 The number of integers k from 1 to n such that the greatest divisor of k that is a unitary divisor of n is squarefree.

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 7, 7, 8, 10, 11, 9, 13, 14, 15, 15, 17, 16, 19, 15, 21, 22, 23, 21, 24, 26, 26, 21, 29, 30, 31, 31, 33, 34, 35, 24, 37, 38, 39, 35, 41, 42, 43, 33, 40, 46, 47, 45, 48, 48, 51, 39, 53, 52, 55, 49, 57, 58, 59, 45, 61, 62, 56, 63, 65, 66, 67, 51
Offset: 1

Views

Author

Amiram Eldar, May 18 2025

Keywords

Crossrefs

Unitary analog of A063659.
The number of integers k from 1 to n such that the greatest divisor of k that is a unitary divisor of n is: A047994 (1), this sequence (squarefree), A384049 (cubefree), A384050 (powerful), A384051 (cubefull), A384052 (square), A384053 (cube), A384054 (exponentially odd), A384055 (odd), A384056 (power of 2), A384057 (3-smooth), A384058 (5-rough).

Programs

  • Mathematica
    f[p_, e_] := If[e == 1, p, p^e-1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a,100]
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, f[i,1]^f[i,2] - if(f[i,2] == 1, 0, 1));}

Formula

Multiplicative with a(p) = p and a(p^e) = p^e - 1 if e >= 2.
a(n) = n * A047994(n) / A384050(n).
a(n) = A047994(A057521(n)) * A055231(n) = A000010(A055231(n)) * A057521(n).
Dirichlet g.f.: zeta(s-1) * zeta(s) * Product_{p prime} (1 - 1/p^s - 1/p^(2*s) + 1/p^(3*s-1)).
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Product_{p prime} (1 - 1/(p^3*(p+1))) = 0.947733... (A065466).

A173290 Partial sums of A001615.

Original entry on oeis.org

1, 4, 8, 14, 20, 32, 40, 52, 64, 82, 94, 118, 132, 156, 180, 204, 222, 258, 278, 314, 346, 382, 406, 454, 484, 526, 562, 610, 640, 712, 744, 792, 840, 894, 942, 1014, 1052, 1112, 1168, 1240, 1282, 1378, 1422, 1494, 1566, 1638, 1686, 1782, 1838, 1928, 2000, 2084
Offset: 1

Views

Author

Jonathan Vos Post, Feb 15 2010

Keywords

Comments

a(n) is even for n >= 2. - Jianing Song, Nov 24 2018

References

  • W. Hürlimann, Dedekind's arithmetic function and primitive four squares counting functions, Journal of Algebra, Number Theory: Advances and Applications, Volume 14, Number 2, 2015, Pages 73-88; http://scientificadvances.co.in; DOI: http://dx.doi.org/10.18642/jantaa_7100121599

Crossrefs

Cf. A082020.
Cf. A175836 (partial products of the Dedekind psi function).

Programs

  • Magma
    [(&+[MoebiusMu(k)^2*Floor(n/k)*Floor(1 + n/k): k in [1..n]])/2: n in [1..60]]; // G. C. Greubel, Nov 23 2018
  • Maple
    with(numtheory): a:=n->(1/2)*add(mobius(k)^2*floor(n/k)*floor(1+n/k),k=1..n); seq(a(n),n=1..55); # Muniru A Asiru, Nov 24 2018
  • Mathematica
    Table[Sum[DirichletConvolve[j, MoebiusMu[j]^2, j, k], {k,1,n}], {n,60}] (* G. C. Greubel, Nov 23 2018 *)
    psi[n_] := If[n==1, 1, n*Times@@(1 + 1/FactorInteger[n][[;;,1]])]; Accumulate[Array[psi, 50]] (* Amiram Eldar, Nov 23 2018 *)
  • PARI
    S(n) = sum(k=1, sqrtint(n), moebius(k)*(n\(k*k))); \\ see: A013928
    a(n) = sum(k=1, sqrtint(n), k*(k+1) * (S(n\k) - S(n\(k+1))))/2 + sum(k=1, n\(1+sqrtint(n)), moebius(k)^2*(n\k)*(1+n\k))/2; \\ Daniel Suteu, Nov 23 2018
    
  • Sage
    def A173290(n) :
        return add(k*mul(1+1/p for p in prime_divisors(k)) for k in (1..n))
    [A173290(n) for n in (1..52)]  # Peter Luschny, Jun 10 2012
    

Formula

a(n) = Sum_{i=1..n} A001615(i) = Sum_{i=1..n} (n * Product_{p|n, p prime} (1 + 1/p)).
a(n) = 15*n^2/(2*Pi^2) + O(n*log(n)). - Enrique Pérez Herrero, Jan 14 2012
a(n) = Sum_{i=1..n} A063659(i) * floor(n/i). - Enrique Pérez Herrero, Feb 23 2013
a(n) = (1/2)*Sum_{k=1..n} mu(k)^2 * floor(n/k) * floor(1+n/k), where mu(k) is the Moebius function. - Daniel Suteu, Nov 19 2018
a(n) = (Sum_{k=1..floor(sqrt(n))} k*(k+1) * (A013928(1+floor(n/k)) - A013928(1+floor(n/(k+1)))) + Sum_{k=1..floor(n/(1+floor(sqrt(n))))} mu(k)^2 * floor(n/k) * floor(1+n/k))/2. - Daniel Suteu, Nov 23 2018

A254926 There are a(n) numbers m such that 1 <= m <= n and gcd(m,n) is cubefree.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 7, 9, 10, 11, 12, 13, 14, 15, 14, 17, 18, 19, 20, 21, 22, 23, 21, 25, 26, 26, 28, 29, 30, 31, 28, 33, 34, 35, 36, 37, 38, 39, 35, 41, 42, 43, 44, 45, 46, 47, 42, 49, 50, 51, 52, 53, 52, 55, 49, 57, 58, 59, 60, 61, 62, 63, 56, 65, 66, 67, 68, 69
Offset: 1

Views

Author

Álvar Ibeas, Feb 10 2015

Keywords

Comments

Dirichlet convolution of A000010 and A212793.
Möbius transform of A254981.

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[e < 3, p^e, p^e - p^(e - 3)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 17 2020 *)
  • PARI
    a(n) = {f = factor(n); for (i=1, #f~, if ((e=f[i,2])>=3, f[i,1] = f[i,1]^e - f[i,1]^(e-3); f[i,2]=1);); factorback(f);} \\ Michel Marcus, Feb 10 2015
    
  • Python
    from math import prod
    from sympy import factorint
    def A254926(n): return prod(p**e - (p**(e-3) if e >= 3 else 0) for p, e in factorint(n).items()) # Chai Wah Wu, Jan 24 2022

Formula

Multiplicative with a(p^e) = p^e, if e<3; a(p^e) = p^e - p^(e-3), otherwise.
Dirichlet g.f.: zeta(s-1) / zeta(3s).
Sum_{k=1..n} a(k) ~ 945*n^2 / (2*Pi^6). - Vaclav Kotesovec, Feb 02 2019 [This is a special case of a general result by McCarthy (1958), which was re-proved later by Cohen (1968). - Petros Hadjicostas, Jul 20 2019]
a(n) = Sum_{v >= 1} mu(v) * [n, v^3] * (n/v^3), where [n, v^3] = 1 when n is a multiple of v^3, and = 0 otherwise. [This is Eq. (53) in Rogel (1900) and Eq. (6.1) in Cohen (1959).] - Petros Hadjicostas, Jul 21 2019
From Richard L. Ollerton, May 07 2021: (Start)
a(n) = Sum_{d|n} phi(d)*A212793(n/d), where phi = A000010.
a(n) = Sum_{k=1..n} A212793(gcd(n,k)).
a(n) = Sum_{k=1..n} A212793(n/gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)). (End)
G.f.: Sum_{k>=1} mu(k) * x^(k^3) / (1 - x^(k^3))^2. - Ilya Gutkovskiy, Aug 20 2021

A384655 a(n) = Sum_{k=1..n} A051903(gcd(n,k)).

Original entry on oeis.org

0, 1, 1, 3, 1, 4, 1, 7, 4, 6, 1, 11, 1, 8, 7, 15, 1, 14, 1, 17, 9, 12, 1, 25, 6, 14, 13, 23, 1, 22, 1, 31, 13, 18, 11, 36, 1, 20, 15, 39, 1, 30, 1, 35, 26, 24, 1, 53, 8, 32, 19, 41, 1, 44, 15, 53, 21, 30, 1, 59, 1, 32, 34, 63, 17, 46, 1, 53, 25, 46, 1, 81, 1, 38
Offset: 1

Views

Author

Amiram Eldar, Jun 06 2025

Keywords

Comments

The terms of this sequence can be calculated efficiently using the 1st formula. The value the of function f(n, k) is equal to the number of integers i from 1 to n such that gcd(i, n) is 1 if k = 1, or k-free if k >= 2 (k-free numbers are numbers that are not divisible by a k-th power other than 1). E.g., f(n, 1) = A000010(n), f(n, 2) = A063659(n), and f(n, 3) = A254926(n).

Examples

			a(4) = A051903(gcd(4,1)) + A051903(gcd(4,2)) + A051903(gcd(4,3)) + A051903(gcd(4,4)) = A051903(1) + A051903(2) + A051903(1) + A051903(4) = 0 + 1 + 0 + 2 = 3.
		

Crossrefs

Programs

  • Mathematica
    e[n_] := If[n == 1, 0, Max[FactorInteger[n][[;;, 2]]]]; a[n_] := Sum[e[GCD[n, k]], {k, 1, n}]; Array[a, 100]
    (* or *)
    f[p_, e_, k_] := p^e - If[e < k, 0, p^(e - k)]; a[n_] := Module[{fct = FactorInteger[n], emax, s}, emax = Max[fct[[;; , 2]]]; s = emax * n; Do[s -= Times @@ (f[#1, #2, k] & @@@ fct), {k, 1, emax}]; s]; a[1] = 0; Array[a, 100]
  • PARI
    e(n) = if(n == 1, 0, vecmax(factor(n)[,2]));
    a(n) = sum(k = 1, n, e(gcd(n, k)));
    
  • PARI
    a(n) = if(n == 1, 0, my(f = factor(n), p = f[,1], e = f[,2], emax = vecmax(e), s = emax*n); for(k = 1, emax, s -= prod(i = 1, #p, p[i]^e[i] - if(e[i] < k, 0, p[i]^(e[i]-k)))); s);

Formula

a(n) = Sum_{k=1..A051903(n)} (n - f(n, k)) = A051903(n) * n - Sum_{k=1..A051903(n)} f(n, k), where f(n, k) is multiplicative for a given k, with f(p^e, k) = p^e - p^(e-k) if e >= k and f(p^e, k) = p^e if e < k.
a(n) = 1 if and only if n is prime.
a(n) >= 2 if and only if n is composite.
a(n) >= A051953(n) with equality if and only if n is squarefree.
a(n) >= 2*n - A000010(n) - A063659(n) with equality if and only if n is cubefree that is not squarefree (i.e., n in A067259, or equivalently, A051903(n) = 2).
a(p^e) = (p^e-1)/(p-1) for a prime p and e >= 1.
a(n) < c*n and lim sun_{n->oo} a(n)/n = c, where c is Niven's constant (A033150).
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Sum{k>=1} (1-1/zeta(2*k)) = 0.49056393035179738598... .
Showing 1-10 of 22 results. Next