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.

Previous Showing 31-40 of 44 results. Next

A072156 Numerator of Sum_{k=1..n} phi(k)/k^2.

Original entry on oeis.org

1, 5, 53, 115, 3163, 3263, 170687, 352399, 1096397, 223513, 28103473, 28459213, 4963286677, 5029541437, 25532475569, 51741301813, 15299527769557, 15415359085157, 5677532668504877, 1144538596366201, 1156827116999161, 1166157760248361, 626832724103131129
Offset: 1

Views

Author

N. J. A. Sloane, Jun 28 2002

Keywords

Examples

			1, 5/4, 53/36, 115/72, 3163/1800, 3263/1800, 170687/88200, ...
		

Crossrefs

Programs

  • GAP
    List([1..25], n-> NumeratorRat( Sum([1..n], k-> Phi(k)/k^2) ) ); # G. C. Greubel, Aug 25 2019
  • Magma
    [Numerator( &+[EulerPhi(k)/k^2: k in [1..n]] ): n in [1..25]]; // G. C. Greubel, Aug 25 2019
    
  • Maple
    with(numtheory); seq(numer(add(phi(k)/k^2, k = 1..n)), n = 1..25); # G. C. Greubel, Aug 25 2019
  • Mathematica
    Numerator[Table[Sum[EulerPhi[k]/k^2,{k,n}],{n,30}]] (* Vincenzo Librandi, Nov 15 2011 *)
    Numerator[Accumulate[Table[EulerPhi[k]/k^2, {k, 1, 30}]]] (* Amiram Eldar, Dec 28 2024 *)
  • PARI
    a(n) = numerator( sum(k=1,n, eulerphi(k)/k^2));
    vector(25, n, a(n)) \\ G. C. Greubel, Aug 25 2019
    
  • Sage
    [numerator( sum(euler_phi(k)/k^2 for k in (1..n)) ) for n in (1..25)] # G. C. Greubel, Aug 25 2019
    

Formula

a(n)/A072157(n) ~ (log(n) + gamma - zeta'(2)/zeta(2)) / zeta(2), where gamma is Euler's constant (A001620). - Amiram Eldar, Dec 28 2024

A087050 Square root of the largest square >1 dividing the n-th nonsquarefree number.

Original entry on oeis.org

2, 2, 3, 2, 4, 3, 2, 2, 5, 3, 2, 4, 6, 2, 2, 3, 4, 7, 5, 2, 3, 2, 2, 3, 8, 2, 6, 5, 2, 4, 9, 2, 2, 3, 2, 4, 7, 3, 10, 2, 6, 4, 2, 3, 2, 11, 2, 5, 3, 8, 2, 3, 2, 2, 12, 7, 2, 5, 2, 3, 2, 4, 9, 2, 2, 13, 3, 2, 5, 4, 6, 2, 2, 3, 8, 14, 3, 10, 2, 3, 4, 2, 6, 2, 4, 15, 2, 2, 3, 2, 4, 11, 9, 2, 7, 2, 5, 6, 16, 2, 3
Offset: 1

Views

Author

Wolfdieter Lang, Sep 08 2003

Keywords

Examples

			n=10, A013929(10) = 27, a(10)^2 = 3^2 = 9. 27 = 9*3.
n=39, A013929(39) = 100, a(39)^2 = 10^2 = 100.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := p^Floor[e/2]; s[1] = 1; s[n_] := Times @@ f @@@ FactorInteger[n]; s /@ Select[Range[300], !SquareFreeQ[#] &] (* Amiram Eldar, Feb 11 2021 *)
  • Python
    from math import isqrt, prod
    from sympy import mobius, factorint
    def A087050(n):
        def f(x): return n+sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return prod(p**(e>>1) for p, e in factorint(m).items() if e>1) # Chai Wah Wu, Jul 22 2024

Formula

a(n)^2 is the largest square factor (from A000290) of the nonsquarefree number A013929(n), n>=1.
a(n) = A000188(A013929(n)). - Amiram Eldar, Feb 11 2021
Sum_{k=1..n} a(k) ~ (n/(2*(zeta(2)-1))) * (log(n) + 3*gamma - 3 - 2*zeta'(2)/zeta(2) - log(1-1/zeta(2))), where gamma is Euler's constant (A001620). - Amiram Eldar, Jan 14 2024

A143304 Decimal expansion of Norton's constant.

Original entry on oeis.org

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

Views

Author

Eric W. Weisstein, Aug 05 2008

Keywords

Comments

The average number of divisions required by the Euclidean algorithm, for a pair of independently and uniformly chosen numbers in the range [1, N] is (12*log(2)/Pi^2) * log(N) + c + O(N^(e-1/6)), for any e>0, where c is this constant (Norton, 1990). - Amiram Eldar, Aug 27 2020

Examples

			0.06535142592303732137...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, p. 157.

Crossrefs

Programs

  • Mathematica
    RealDigits[-((Pi^2 - 6*Log[2]*(24 * Log[Glaisher] + 2*EulerGamma + Log[2] - 2 * Log[Pi] - 3))/Pi^2), 10, 100][[1]] (* Amiram Eldar, Aug 27 2020 *)

Formula

Equals -((Pi^2 - 6*log(2)*(-3 + 2*EulerGamma + log(2) + 24*log(Glaisher) - 2*log(Pi)))/Pi^2).
Equals (12*log(2)/Pi^2) * (zeta'(2)/zeta(2) - 1/2) + A086237 - 1/2. - Amiram Eldar, Aug 27 2020

A268732 Sum of the numbers of divisors of gcd(x,y) with x*y <= n.

Original entry on oeis.org

1, 3, 5, 9, 11, 15, 17, 23, 27, 31, 33, 41, 43, 47, 51, 60, 62, 70, 72, 80, 84, 88, 90, 102, 106, 110, 116, 124, 126, 134, 136, 148, 152, 156, 160, 176, 178, 182, 186, 198, 200, 208, 210, 218, 226, 230, 232, 250, 254, 262, 266, 274, 276, 288, 292, 304, 308, 312, 314, 330
Offset: 1

Views

Author

Michel Marcus, Feb 12 2016

Keywords

Comments

Partial sums of A124315.

Crossrefs

Programs

  • Mathematica
    Table[Total@ Flatten@ Map[Function[k, DivisorSigma[0, GCD[#, k]] & /@ Select[Range@ n, # k <= n &]], Range@ n], {n, 60}] (* Michael De Vlieger, Feb 12 2016 *)
  • PARI
    a(n) = sum(k=1, n, sumdiv(k, d, numdiv(gcd(d, k/d))));
    
  • PARI
    a(n) = sum(k=1, sqrtint(n), 2*sum(j=1, sqrtint(n\(k*k)), n\(j*k*k))-sqrtint(n\(k*k))^2); \\ Daniel Suteu, Jan 08 2019
    
  • PARI
    a(n)=sum(k=1,n,sum(j=1,sqrt(n/k),floor(n/k/j^2))); \\ Benoit Cloitre, Oct 02 2022

Formula

a(n) = Sum_{k=1..floor(sqrt(n))} (2*Sum_{j=1..floor(sqrt(n/k^2))} floor(n/(j*k^2)) - floor(sqrt(n/k^2))^2). - Daniel Suteu, Jan 08 2019
a(n) = n*zeta(2)*(log(n) + 2*gamma - 1 + 2*zeta'(2)/zeta(2)) + O(sqrt(n)*log(n)), where gamma is the Euler-Mascheroni constant A001620. - Daniel Suteu, Jan 11 2019
a(n) = Sum_{i=1..n} Sum_{j=1..n} floor(sqrt(n/(i*j))). - Ridouane Oudra, Apr 13 2025

A356472 Numerator of the average of gcd(i,n) for i = 1..n.

Original entry on oeis.org

1, 3, 5, 2, 9, 5, 13, 5, 7, 27, 21, 10, 25, 39, 3, 3, 33, 7, 37, 18, 65, 63, 45, 25, 13, 75, 3, 26, 57, 9, 61, 7, 35, 99, 117, 14, 73, 111, 125, 9, 81, 65, 85, 42, 21, 135, 93, 5, 19, 39, 55, 50, 105, 9, 189, 65, 185, 171, 117, 6, 121, 183, 13, 4, 45, 105, 133, 66, 75, 351, 141, 35, 145, 219, 13, 74, 39, 125, 157
Offset: 1

Views

Author

Matthias Kaak, Aug 08 2022

Keywords

Examples

			For n = 3, the average of the gcd's is (gcd(1,3) + gcd(2,3) + gcd(3,3))/3 = (1 + 1 + 3)/3 = 5/3 and its numerator is a(3)=5.
		

Crossrefs

Cf. A356473 (denominators), A018804, A057661 (LCM).

Programs

  • Haskell
    map numerator (map (\i -> sum (map (\j -> gcd i j) [1..i]) % i) [1..])
    
  • Mathematica
    Table[Numerator[Sum[GCD[I, j], {j, 1, I}]/I], {I, 100}]
    f[p_, e_] := e*(p - 1)/p + 1; a[n_] := Numerator[Times @@ f @@@ FactorInteger[n]]; Array[a, 100] (* Amiram Eldar, Apr 28 2023 *)
  • PARI
    a(n) = numerator(sum(i=1, n, gcd(i, n))/n); \\ Michel Marcus, Aug 08 2022
    
  • PARI
    a(n,f=factor(n))=my(k=prod(i=1, #f~, (f[i, 2]*(f[i, 1]-1)/f[i, 1] + 1)*f[i, 1]^f[i, 2])); k/gcd(k,n) \\ Charles R Greathouse IV, Sep 08 2022
    
  • Python
    from math import prod, gcd
    from sympy import factorint
    def A356472(n):
        f = factorint(n)
        return (m:=prod((p-1)*e+p for p, e in f.items()))//gcd(prod(f),m) # Chai Wah Wu, Sep 08 2022

Formula

a(n) = numerator(A018804(n)/n).
a(n) << n^(1+e) for any e > 0. a(n) > 1 for all n > 1. - Charles R Greathouse IV, Sep 08 2022
Sum_{k=1..n} a(k)/A356473(k) ~ (n/zeta(2)) * (log(n) + 2*gamma - 1 - zeta'(2)/zeta(2)), where gamma is Euler's constant (A001620). - Amiram Eldar, Dec 25 2024

A360164 a(n) is the sum of the square roots of the unitary divisors of n that are odd squares.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 8, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 6, 1, 1, 1, 1, 1, 10, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Amiram Eldar, Jan 29 2023

Keywords

Comments

First differs from A336649 at n = 27.
The unitary analog of A360163.

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[OddQ[e], 1, p^(e/2) + 1]; f[2, 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~, if(f[i, 1] == 2, 1, if(f[i, 2]%2, 1, f[i, 1]^(f[i, 2]/2) + 1))); }

Formula

a(n) = Sum_{d|n, gcd(d, n/d)=1, d odd square} sqrt(d).
a(n) = A360162(n) if n is not of the form (2*m - 1)*4^k where m >= 1, k >= 1 (A108269).
Multiplicative with a(2^e) = 1, and for p > 2, a(p^e) = p^(e/2) + 1 if e is even and 1 if e is odd.
Dirichlet g.f.: (zeta(s)*zeta(2*s-1)/zeta(3*s-1))*(2^(3*s)-2^(s+1))/(2^(3*s)-2).
Sum_{k=1..n} a(k) ~ (2*n/Pi^2)*(log(n) + 3*gamma - 1 + log(2) - 3*zeta'(2)/zeta(2)), where gamma is Euler's constant (A001620).

A063754 Dirichlet convolution of totient and cototient.

Original entry on oeis.org

0, 1, 1, 3, 1, 7, 1, 8, 5, 11, 1, 20, 1, 15, 13, 20, 1, 31, 1, 32, 17, 23, 1, 52, 9, 27, 21, 44, 1, 71, 1, 48, 25, 35, 21, 88, 1, 39, 29, 84, 1, 99, 1, 68, 61, 47, 1, 128, 13, 83, 37, 80, 1, 123, 29, 116, 41, 59, 1, 200, 1, 63, 81, 112, 33, 155, 1, 104, 49, 159, 1, 228, 1, 75, 101
Offset: 1

Views

Author

Labos Elemer, Aug 14 2001

Keywords

Comments

a(n) = 1 if and only if n is prime. - Robert Israel, Feb 04 2018
a(n) = n+1 if and only if n = 2*p with p an odd prime (A100484 \ {4}). - Bernard Schott, Jun 19 2023

Examples

			n = 24: divisors = {1, 2, 3, 4, 6, 8, 12, 24}, d-phi(d) = {0, 1, 1, 2, 4, 4, 8, 16}, phi(n/d) = {8, 4, 4, 2, 2, 2, 1, 1}, products = {0, 4, 4, 4, 8, 8, 8, 16}, a(24) = 52.
		

Crossrefs

Programs

  • Maple
    f:= n -> add(numtheory:-phi(d)*(n/d - numtheory:-phi(n/d)), d=numtheory:-divisors(n)):
    map(f, [$1..100]); # Robert Israel, Feb 04 2018
  • Mathematica
    f1[p_, e_] := (e*(p - 1)/p + 1)*p^e; f2[p_, e_] := (e+1)*(p^e - p^(e-1)) - (e-1)*(p^(e-1) - p^(e-2)); a[n_] := Times @@ f1 @@@ (fct = FactorInteger[n]) - Times @@ f2 @@@ fct; a[1] = 0; Array[a, 100] (* Amiram Eldar, Apr 28 2023 *)
  • PARI
    a(n) = sumdiv(n, d, eulerphi(d)*(n/d - eulerphi(n/d))); \\ Michel Marcus, Feb 05 2018

Formula

a(n) = Sum_{d|n} A000010(d)*A051953(n/d).
From Richard L. Ollerton, May 06 2021: (Start)
a(n) = Sum_{k=1..n} A051953(gcd(n,k)).
a(n) = Sum_{k=1..n} A051953(n/gcd(n,k))*A000010(gcd(n,k))/A000010(n/gcd(n,k)).
a(n) = A018804(n) - A029935(n). (End)
Sum_{k=1..n} a(k) ~ (1/(2*zeta(2)))*(1 - 1/zeta(2)) * n^2 * (log(n) + 2*gamma - 1/2 - ((zeta(2)-2)/(zeta(2)-1))*(zeta'(2)/zeta(2))), where gamma is Euler's constant (A001620). - Amiram Eldar, Jan 11 2024

Extensions

Offset corrected by Robert Israel, Feb 04 2018

A068074 a(n) = Sum_{d|n} (-1)^d*2^omega(n/d) where omega(x) is the number of distinct prime factors in the factorization of x.

Original entry on oeis.org

-1, -1, -3, 1, -3, -3, -3, 3, -5, -3, -3, 3, -3, -3, -9, 5, -3, -5, -3, 3, -9, -3, -3, 9, -5, -3, -7, 3, -3, -9, -3, 7, -9, -3, -9, 5, -3, -3, -9, 9, -3, -9, -3, 3, -15, -3, -3, 15, -5, -5, -9, 3, -3, -7, -9, 9, -9, -3, -3, 9, -3, -3, -15, 9, -9, -9, -3, 3, -9, -9, -3, 15, -3, -3, -15, 3, -9, -9, -3, 15, -9, -3, -3, 9, -9, -3, -9, 9, -3
Offset: 1

Views

Author

Benoit Cloitre, Apr 14 2002

Keywords

References

  • Gérald Tenenbaum and Jie Wu, Cours spécialisés No. 2: "Exercices corrigés de théorie analytique et probabiliste des nombres", Collection SMF, chapter II.7.1, p. 105.

Crossrefs

Programs

  • Haskell
    a068074 n | odd n     = - a048691 n
              | otherwise = 2 * a048691 (n `div` 2) - a048691 n
    -- Reinhard Zumkeller, Jul 12 2012
    
  • Mathematica
    a[n_?OddQ] := -DivisorSigma[0, n^2]; a[n_?EvenQ] := 2*DivisorSigma[0, n^2/4] - DivisorSigma[0, n^2]; Table[a[n], {n, 1, 89}] (* Jean-François Alcover, Nov 15 2011, after Vladeta Jovovic *)
    f[p_, e_] := 2*e + 1; f[2, e_] := 3-2*e; a[1] = -1; a[n_] := -Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = sumdiv(n, d, (-1)^d*2^omega(n/d)); \\ Michel Marcus, Oct 08 2017
    
  • PARI
    a(n) = -numdiv(n^2) + if(!(n%2), 2*numdiv(n^2/4)); \\ Amiram Eldar, Apr 24 2025

Formula

Asymptotic formula: Sum_{k=1..n} a(k)/k ~ -C*log(n)^2 with C = 3*log(2)/Pi^2.
a(n) = -tau(n^2) for odd n and 2*tau(n^2/4) - tau(n^2) for even n. b(n) = abs(a(n)) is multiplicative with b(2^e) = abs(2*e-3) and b(p^e) = 2*e+1 for an odd prime p. - Vladeta Jovovic, Apr 25 2002
a(n) = if n odd then -A048691(n) else 2*A048691(n/2) - A048691(n). - Reinhard Zumkeller, Jul 12 2012
From Amiram Eldar, Apr 24 2025: (Start)
More precisely, b(n) = -a(n) is multiplicative with b(2^e) = 3-2*e and b(p^e) = 2*e+1 for an odd prime p.
Dirichlet g.f.: -(zeta(s)^3/zeta(2*s)) * (1-1/2^(s-1)).
Sum_{k=1..n} a(k) ~ -(log(2)/zeta(2)) * n * (log(n) + 3*gamma - 1 - log(2)/2 - 2*zeta'(2)/zeta(2)), where gamma is Euler's constant (A001620). (End)

A309153 a(n) = A000203(n)*A001227(n).

Original entry on oeis.org

1, 3, 8, 7, 12, 24, 16, 15, 39, 36, 24, 56, 28, 48, 96, 31, 36, 117, 40, 84, 128, 72, 48, 120, 93, 84, 160, 112, 60, 288, 64, 63, 192, 108, 192, 273, 76, 120, 224, 180, 84, 384, 88, 168, 468, 144, 96, 248, 171, 279, 288, 196, 108, 480, 288, 240, 320, 180, 120, 672, 124, 192, 624, 127, 336, 576, 136, 252, 384
Offset: 1

Views

Author

Omar E. Pol, Jul 14 2019

Keywords

Comments

A001227(n) is denoted by Delta_0(n) in Glaisher 1907.
a(n) = A000203(n) iff n is a power of 2.

Crossrefs

Programs

  • Mathematica
    Array[DivisorSum[#, 1 &, OddQ] DivisorSigma[1, #] &, 69] (* Michael De Vlieger, Nov 22 2019 *)
    f[p_, e_] := (e+1)*(p^(e+1)-1)/(p-1); f[2, e_] := 2^(e+1) - 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 01 2022 *)

Formula

a(n) = sigma(n)*delta(n).
Multiplicative with a(2^e) = 2^(e+1) - 1 and a(p^e) = (e+1)*(p^(e+1)-1)/(p-1) for p > 2. - Amiram Eldar, Nov 01 2022
From Amiram Eldar, Dec 04 2023: (Start)
Dirichlet g.f.: (4^s - 3*2^s + 2)/(4^s - 2) * (zeta(s)*zeta(s-1))^2/zeta(2*s-1).
Sum_{k=1..n} a(k) ~ (Pi^4/(168*zeta(3))) * n^2 * (log(n) + 2*gamma - 1/2 + 22*log(2)/21 + 2*zeta'(2)/zeta(2) - 2*zeta'(3)/zeta(3)), where gamma is Euler's constant (A001620). (End)

A345308 Decimal expansion of Sum_{p primes} log(p) / (p-1)^2.

Original entry on oeis.org

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

Views

Author

Vaclav Kotesovec, Jun 13 2021

Keywords

Examples

			1.226968805653470005965662568745762562988257454901426311714794620109...
		

Crossrefs

Programs

  • Mathematica
    ratfun = 1/((p - 1)^2); zetas = 0; ratab = Table[konfun = Simplify[ratfun + c/(p^power - 1)] // Together; coefs = CoefficientList[Numerator[konfun], p]; sol = Solve[Last[coefs] == 0, c][[1]]; zetas = zetas + c*Zeta'[power]/Zeta[power] /. sol; ratfun = konfun /. sol, {power, 2, 25}]; Do[Print[N[Sum[Log[p]*ratfun /. p -> Prime[k], {k, 1, m}] + zetas, 110]], {m, 1000, 5000, 1000}]
Previous Showing 31-40 of 44 results. Next