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 11-20 of 28 results. Next

A015617 Number of (unordered) triples of integers from [1,n] with no common factors between pairs.

Original entry on oeis.org

0, 0, 1, 2, 7, 8, 19, 25, 37, 42, 73, 79, 124, 138, 159, 183, 262, 277, 378, 405, 454, 491, 640, 668, 794, 850, 959, 1016, 1257, 1285, 1562, 1668, 1805, 1905, 2088, 2150, 2545, 2673, 2866, 2968, 3457, 3522, 4063, 4228, 4431, 4620, 5269, 5385, 5936
Offset: 1

Views

Author

Keywords

Comments

Form the graph with nodes 1..n, joining two nodes by an edge if they are relatively prime; a(n) = number of triangles in this graph. - N. J. A. Sloane, Feb 06 2011. The number of edges in this graph is A015614. - Roberto Bosch Cabrera, Feb 07 2011.

Examples

			For n=5, there are a(5)=7 triples: (1,2,3), (1,2,5), (1,3,4), (1,3,5), (1,4,5), (2,3,5) and (3,4,5) out of binomial(5,3) = 10 triples of distinct integers <= 5.
		

Crossrefs

Subset of A015616 (triples with no common factor) and A015631 (ordered triples with no common factor).
Cf. A185953 (first differences), A186230, Column 3 of triangle A186974.

Programs

  • Mathematica
    a[n_] := Select[Subsets[Range[n], {3}], And @@ (GCD @@ # == 1 & /@ Subsets[#, {2}]) &] // Length; a /@ Range[49]
    (* Jean-François Alcover, Jul 11 2011 *)
  • PARI
    a(n)=sum(a=1,n-2,sum(b=a+1,n-1,sum(c=b+1,n, gcd(a,b)==1 && gcd(a,c)==1 && gcd(b,c)==1))) \\ Charles R Greathouse IV, Apr 28 2015

Formula

For large n one can show that a(n) ~ C*binomial(n,3), where C = 0.28674... = A065473. - N. J. A. Sloane, Feb 06 2011.
a(n) = Sum_{r=1..n} Sum_{k=1..r} A186230(r,k). - Alois P. Heinz, Feb 17 2011

Extensions

Added one example and 2 cross-references. - Olivier Gérard, Feb 06 2011.

A069212 a(n) = Sum_{k=1..n} 3^omega(k).

Original entry on oeis.org

1, 4, 7, 10, 13, 22, 25, 28, 31, 40, 43, 52, 55, 64, 73, 76, 79, 88, 91, 100, 109, 118, 121, 130, 133, 142, 145, 154, 157, 184, 187, 190, 199, 208, 217, 226, 229, 238, 247, 256, 259, 286, 289, 298, 307, 316, 319, 328, 331, 340, 349, 358, 361, 370, 379, 388, 397
Offset: 1

Views

Author

Benoit Cloitre, Apr 14 2002

Keywords

Comments

More generally, if b is an integer =>3, Sum_{k=1..n} b^omega(k) ~ C(b)*n*log(n)^(b-1) where C(b)=1/(b-1)!*prod((1-1/p)^(b-1)*(1+(b-1)/p)).

References

  • G. Tenenbaum and Jie Wu, Cours Spécialisés No. 2: "Théorie analytique et probabiliste des nombres", Collection SMF, Ordres moyens, p. 20.
  • G. Tenenbaum, Introduction to analytic and probabilistic number theory, 3rd ed., American Mathematical Soc. (2015). See page 59.

Crossrefs

Partial sums of A074816.

Programs

  • Mathematica
    Accumulate @ Table[3^PrimeNu[n], {n, 1, 57}] (* Amiram Eldar, May 24 2020 *)
  • Python
    from sympy.ntheory.factor_ import primenu
    def A069212(n): return sum(3**primenu(m) for m in range(1,n+1)) # Chai Wah Wu, Sep 07 2023

Formula

Asymptotic formula: a(n) ~ C*n*log(n)^2 with C = (1/2) * Product_{p} ((1-1/p)^2*(1+2/p)) where the product is over all the primes.
The constant C is A065473/2. - Amiram Eldar, May 24 2020
From Ridouane Oudra, Jan 01 2021: (Start)
a(n) = Sum_{i=1..n} Sum_{j=1..n} mu(i*j)^2*floor(n/(i*j));
a(n) = Sum_{i=1..n} mu(i)^2*tau(i)*floor(n/i);
a(n) = Sum_{i=1..n} 2^Omega(i)*mu(i)^2*floor(n/i), where Omega = A001222. (End)
From Vaclav Kotesovec, Feb 16 2022: (Start)
More precise asymptotics:
Let f(s) = Product_{primes p} (1 - 3/p^(2*s) + 2/p^(3*s)), then
a(n) ~ n * (f(1)*log(n)^2/2 + log(n)*((3*gamma - 1)*f(1) + f'(1)) + f(1)*(1 - 3*gamma + 3*gamma^2 - 3*sg1) + (3*gamma - 1)*f'(1) + f''(1)/2),
where f(1) = A065473 = Product_{primes p} (1 - 3/p^2 + 2/p^3) = 0.2867474284344787341078927127898384464343318440970569956414778593366522...,
f'(1) = f(1) * Sum_{primes p} 6*log(p) / (p^2 + p - 2) = 0.8023233847630974628467999132875783526536954420333140745016349208975965...,
f''(1) = f'(1)^2/f(1) + f(1) * Sum_{primes p} -6*p*(2*p+1) * log(p)^2 / (p^2 + p - 2)^2 = -0.255987592484328884627082229528266165335336670389046663124468278519...
and gamma is the Euler-Mascheroni constant A001620 and sg1 is the first Stieltjes constant (see A082633). (End)

A299822 Product of Euler's totient and the squarefree kernel, a(n) = phi(n)*rad(n).

Original entry on oeis.org

1, 2, 6, 4, 20, 12, 42, 8, 18, 40, 110, 24, 156, 84, 120, 16, 272, 36, 342, 80, 252, 220, 506, 48, 100, 312, 54, 168, 812, 240, 930, 32, 660, 544, 840, 72, 1332, 684, 936, 160, 1640, 504, 1806, 440, 360, 1012, 2162, 96, 294, 200, 1632, 624, 2756, 108, 2200, 336, 2052, 1624
Offset: 1

Views

Author

R. J. Mathar, Feb 19 2018

Keywords

Comments

A permutation of A323333. - Amiram Eldar, Sep 19 2020

Crossrefs

Programs

  • Maple
    A299822 := proc(n)
        local a,p,e,pe;
        a := 1;
        for pe in ifactors(n)[2] do
            p := pe[1] ; e:= pe[2] ;
            a := a*p*(p-1)*p^(e-1) ;
        end do:
        a ;
    end proc:
    seq(A299822(n),n=1..130) ;
  • Mathematica
    Array[EulerPhi[#] SelectFirst[Reverse@ Divisors@ #, SquareFreeQ] &, 58] (* Michael De Vlieger, Feb 20 2018 *)
    f[p_, e_] := (p-1)*p^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 19 2020 *)
  • PARI
    a(n) = eulerphi(n)*factorback(factorint(n)[, 1]); \\ Michel Marcus, Jun 24 2019

Formula

a(n) = A000010(n)*A007947(n) = n*A173557(n).
Dirichlet g.f.: zeta(s-1)*Product_{p prime} (1 - 2*p^(1-s) + p^(2-s)), corrected by Vaclav Kotesovec, Dec 18 2019
Multiplicative with a(p^e) = p*(p-1)*p^(e-1).
a(n) = n*abs(A023900(n)). (Trivially rephrasing a formula in A173557.) - Omar E. Pol, Feb 19 2018
a(2^e) = 2^e. (Special case of above.) - Omar E. Pol, Feb 19 2018
A003557(n) | a(n). - R. J. Mathar, Feb 26 2018
From Vaclav Kotesovec, Dec 18 2019: (Start)
Dirichlet g.f.: zeta(s-1) * zeta(s-2) * Product_{primes p} (1 + 2*p^(3-2*s) - p^(4-2*s) - 2*p^(1-s)).
Sum_{k=1..n} a(k) ~ c * Pi^2 * n^3 / 18, where c = A065473 = Product_{primes p} (1 - 3/p^2 + 2/p^3) = 0.2867474284344787341078927... (End)
Sum_{n>=1} 1/a(n) = Product_{p prime} (1 + 1/(p-1)^2) = 2.826419... (A065485). - Amiram Eldar, Sep 19 2020
G.f. for a signed version of the sequence: Sum_{n >= 1} mu(n)*n^2*x^n/(1 - x^n)^2 = Sum_{n >= 1} (-1)^omega(n)*a(n)*x^n = x - 2*x^2 - 6*x^3 - 4*x^4 - 20*x^5 + 12*x^6 - 42*x^7 - 8*x^8 - 18*x^9 + 40*x^10 - ..., where mu(n) is the Möbius function A008683(n) and omega(n) = A001221(n) is the number of distinct primes dividing n. - Peter Bala, Mar 05 2022

A330594 Decimal expansion of Product_{primes p} (1 + 1/p^2 - 2/p^3).

Original entry on oeis.org

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

Views

Author

Vaclav Kotesovec, Dec 19 2019

Keywords

Examples

			1.106960111953217676651179130007439592949548833658122419043134044978777...
		

Crossrefs

Programs

  • Mathematica
    Do[Print[N[Exp[-Sum[q = Expand[(-p^2 + 2*p^3)^j]; Sum[PrimeZetaP[Exponent[q[[k]], p]] * Coefficient[q[[k]], p^Exponent[q[[k]], p]], {k, 1, Length[q]}]/j, {j, 1, t}]], 110]], {t, 20, 200, 20}]
  • PARI
    prodeulerrat(1 + 1/p^2 - 2/p^3) \\ Amiram Eldar, Mar 16 2021

A065480 Decimal expansion of Product_{p prime} (1 - 1/(p^2+p-1)).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Nov 19 2001

Keywords

Comments

The probability that two numbers are coprime given that they are both coprime to a randomly chosen third number. - Luke Palmer, Apr 27 2019

Examples

			0.6695802905390623676350256956124342...
		

Crossrefs

Programs

  • Mathematica
    digits = 98; Exp[NSum[(1/2)*(-2 + (-2)^n - ((1/2)*(-1 - Sqrt[5]))^n*(-1 + Sqrt[5]) + ((1/2)*(-1 + Sqrt[5]))^n*(1 + Sqrt[5]))*PrimeZetaP[n - 1]/(n - 1), {n, 3, Infinity}, WorkingPrecision -> 4 digits, Method -> "AlternatingSigns"]] // RealDigits[#, 10, digits]& // First (* Jean-François Alcover, Apr 18 2016 *)
  • PARI
    prodeulerrat(1 - 1/(p^2+p-1)) \\ Amiram Eldar, Mar 14 2021

Formula

Equals A065473*zeta(2)/A065463. - Luke Palmer, Apr 27 2019

A118259 Numbers of strongly carefree couples (a,b) with a,b <= n.

Original entry on oeis.org

1, 3, 7, 7, 13, 17, 27, 27, 27, 33, 47, 47, 63, 73, 85, 85, 107, 107, 131, 131, 147, 165, 195, 195, 195, 215, 215, 215, 249, 265, 303, 303, 329, 355, 385, 385, 431, 461, 495, 495, 547, 569, 625, 625, 625, 661, 721, 721, 721, 721, 763, 763, 827, 827, 877, 877
Offset: 1

Views

Author

Eric W. Weisstein, Apr 20 2006

Keywords

Comments

(a, b) is a strongly carefree couple if gcd(a, b) = 1 and both a and b are squarefree (A005117). - Amiram Eldar, Mar 03 2021

References

  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, Section 2.5.1 Carefree Couples, p. 110.

Crossrefs

Programs

  • Mathematica
    Table[nn = n;Length[Select[Level[Table[Table[{i, j}, {i, 1, nn}], {j, 1, nn}], {2}],Apply[GCD, #] == 1 && SquareFreeQ[#[[1]]] &&SquareFreeQ[#[[2]]] &]], {n, 1, 56}] (* Geoffrey Critzer, Jan 13 2015 *)
  • PARI
    a(n)=sum(i=1,n,sum(j=1,n,moebius(i*j)^2)) \\ Benoit Cloitre, Oct 10 2009

Formula

a(n) = Sum_{i,j=1...n} mu(i*j)^2. - Benoit Cloitre, Oct 10 2009
From Amiram Eldar, Mar 03 2021: (Start)
a(n) = 2*A118258(n) - A118260(n).
a(n) ~ A065473 * n^2 + O(n*log(n)). (End)

A069201 a(n) = Sum_{k=1..n} mu(k)^2 * 2^omega(k) where omega(k) is the number of distinct primes in the factorization of k.

Original entry on oeis.org

1, 3, 5, 5, 7, 11, 13, 13, 13, 17, 19, 19, 21, 25, 29, 29, 31, 31, 33, 33, 37, 41, 43, 43, 43, 47, 47, 47, 49, 57, 59, 59, 63, 67, 71, 71, 73, 77, 81, 81, 83, 91, 93, 93, 93, 97, 99, 99, 99, 99, 103, 103, 105, 105, 109, 109, 113, 117, 119, 119, 121, 125, 125, 125, 129, 137
Offset: 1

Views

Author

Benoit Cloitre, Apr 14 2002

Keywords

References

  • G. Tenenbaum and Jie Wu, Cours Spécialisés No. 2: "Théorie analytique et probabiliste des nombres", Collection SMF, Ordres moyens, p. 20.

Crossrefs

Partial sums of A074823.

Programs

  • Magma
    [&+[MoebiusMu(k)^2*#Divisors(k):k in [1..n]]: n in [1..66]]; // Marius A. Burtea, Jul 27 2019
  • Maple
    with(numtheory): seq(add(tau(k)*mobius(k)^2, k=1..n), n=1..90); # Ridouane Oudra, Jul 25 2019
  • Mathematica
    Accumulate @ Table[MoebiusMu[n]^2 * 2^PrimeNu[n], {n, 1, 66}] (* Amiram Eldar, May 24 2020 *)
  • PARI
    a(n) = sum(k=1, n, moebius(k)^2*2^omega(k)); \\ Michel Marcus, Jul 23 2017
    
  • Scheme
    (define (A069201 n) (if (= 1 n) n (+ (A074823 n) (A069201 (- n 1))))) ;; Antti Karttunen, Jul 23 2017
    

Formula

Asymptotic formula: a(n) = C*n*log(n) + O(n) with C = Product_{p prime} (1 - 1/p)^2*(1 + 2/p).
The constant C is A065473. - Amiram Eldar, May 24 2020
a(n) = Sum_{k=1..n} mu(k)^2*d(k), where d is the number of divisors function (A000005). - Ridouane Oudra, Jul 25 2019
More precise asymptotics: Let f(s) = Product_{primes p} (1 - 3/p^(2*s) + 2/p^(3*s)), then a(n) ~ n*(f(1)*(log(n) + 2*gamma - 1) + f'(1)), where f(1) = A065473, f'(1) = f(1) * Sum_{primes p} 6*log(p)/(p^2 + p - 2) = 0.802323384763097462846799913287578352653695442033314074501634920897596526... and gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Aug 20 2021

A158274 Numerators of antiharmonic means of divisors of n.

Original entry on oeis.org

1, 5, 5, 3, 13, 25, 25, 17, 7, 65, 61, 15, 85, 125, 65, 11, 145, 35, 181, 13, 125, 305, 265, 85, 21, 425, 41, 75, 421, 325, 481, 65, 305, 725, 325, 21, 685, 181, 425, 221, 841, 625, 925, 61, 91, 1325, 1105, 55, 43, 35
Offset: 1

Views

Author

Jaroslav Krizek, Mar 15 2009

Keywords

Comments

Numbers k such that sigma_2(k)/sigma_1(k) = A001157(k)/A000203(k) are integers are in A020487.

Examples

			Antiharmonic means of divisors of n>=1: 1, 5/3, 5/2, 3, 13/2, 25/6, ...
		

Crossrefs

Cf. A000203, A001157, A020487, A065473, A152649, A158275 (denominators)

Programs

  • Mathematica
    Table[Numerator[DivisorSigma[2, n]/DivisorSigma[1, n]], {n, 50}] (* Ivan Neretin, May 22 2015 *)
  • PARI
    a(n) = numerator(sigma(n,2)/sigma(n)); \\ Amiram Eldar, Nov 21 2022

Formula

Antiharmonic mean of divisors of number n = Product (p_i^e_i) is sigma_2(n)/sigma_1(n) = A001157(n)/A000203(n) = Product ((p_i^(e_i+1)+1)/(p_i+1)).
Sum_{k=1..n} a(k)/A158275(k) ~ c * n^2, where c = (Pi^4/72) * Product_{p prime} (1 - (3*p-2)/(p^3)) = A152649 * A065473 = 0.387941... . - Amiram Eldar, Nov 21 2022

A061780 Number of solutions to x + y + z = 0 mod (2n+1) such that x,y,z are units modulo 2n+1, i.e., gcd(x, 2n+1) = gcd(y, 2n+1) = gcd(z, 2n+1) = 1.

Original entry on oeis.org

2, 12, 30, 18, 90, 132, 24, 240, 306, 60, 462, 300, 162, 756, 870, 180, 360, 1260, 264, 1560, 1722, 216, 2070, 1470, 480, 2652, 1080, 612, 3306, 3540, 540, 1584, 4290, 924, 4830, 5112, 600, 2700, 6006, 1458, 6642, 2880, 1512, 7656, 3960, 1740, 3672, 9120
Offset: 1

Views

Author

Ahmed Fares (ahmedfares(AT)my-deja.com), Jun 22 2001

Keywords

Comments

This sequence is not multiplicative. What is multiplicative is the sequence b = 1,0,2,0,12,0,30, ... such that a(n) = b(2n+1) and b(2n)=0. - Robert Israel, Jan 29 2017

Examples

			The only solutions modulo 3 in units are 1+1+1 = 0 mod 3, 2+2+2 = 0 mod 3 so the first element of the sequence is 2.
		

Crossrefs

Cf. A065473.

Programs

  • Maple
    f:= n -> n^2*mul((1-1/p)*(1-2/p),p=numtheory:-factorset(n)):
    seq(f(2*n+1),n=1..100); # Robert Israel, Jan 29 2017
  • Mathematica
    a[n_] := (2*n+1)^2 * Product[(1-1/p)*(1-2/p), {p, FactorInteger[2*n+1][[;;,1]]}]; Array[a, 50] (* Amiram Eldar, Jan 03 2022 *)

Formula

If 2n+1 = p^k is a prime power with p an odd prime then a(n) = p^(2k-2) * (p^2 - 3p + 2).
a(n) = (2n+1)^2 * Product_{primes p | 2n+1} (1 - 3/p + 2/p^2). - Robert Israel, Jan 29 2017
Sum_{k=1..n} a(k) ~ c * (2*n)^3/3 + O(n^2*log(n)^3), where c = A065473 (Tóth, 2021). - Amiram Eldar, Jan 03 2022

Extensions

More terms from Vladeta Jovovic, Jun 23 2001
Corrected by Robert Israel, Jan 29 2017

A070072 Number of distinct rectangles with integer sides <= n and squarefree area.

Original entry on oeis.org

1, 2, 4, 4, 7, 9, 14, 14, 14, 17, 24, 24, 32, 37, 43, 43, 54, 54, 66, 66, 74, 83, 98, 98, 98, 108, 108, 108, 125, 133, 152, 152, 165, 178, 193, 193, 216, 231, 248, 248, 274, 285, 313, 313, 313, 331, 361, 361, 361, 361, 382, 382, 414
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 21 2002

Keywords

Examples

			There are seven rectangles with sides <= 5 having a squarefree area: 1 X 1, 1 X 2, 1 X 3, 1 X 5, 2 X 3, 2 X 5 and 3 X 5, whereas 1 X 4, 2 X 2, 2 X 4, 3 X 3, 3 X 4, 4 X 4, 4 X 5 and 5 X 5 are not squarefree; therefore a(5) = 7.
		

Crossrefs

Programs

  • Haskell
    a070072 n = length [() | x <- [1..n], y <- [1..x], a008966 (x*y) == 1]
    -- Reinhard Zumkeller, May 26 2012
    
  • Magma
    [&+[&+[MoebiusMu(i*j)^2:j in [1..i]]:i in [1..n]]:n in [1..53]]; // Marius A. Burtea, Oct 17 2019

Formula

a(n) = Sum_{i=1..n} Sum_{j= 1..i} mu(i*j)^2, where mu is the Moebius function (A008683). - Ridouane Oudra, Oct 17 2019
a(n) = (A118259(n) + 1)/2. - Ridouane Oudra, May 06 2025
a(n) = c * n^2 / 2 + O(n*log(n)), where c = Product_{p prime} (1 - (3*p-2)/(p^3)) (A065473). - Amiram Eldar, May 12 2025
Previous Showing 11-20 of 28 results. Next