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 21-28 of 28 results.

A256390 a(n) = number of triples (a,b,c) of natural numbers a,b,c <= n with gcd(a,b)=gcd(b,c)=gcd(c,a)=1.

Original entry on oeis.org

1, 4, 13, 22, 55, 64, 133, 172, 247, 280, 469, 508, 781, 868, 997, 1144, 1621, 1714, 2323, 2488, 2785, 3010, 3907, 4078, 4837, 5176, 5833, 6178, 7627, 7798, 9463, 10102, 10927, 11530, 12631, 13006, 15379, 16150, 17311, 17926, 20863, 21256
Offset: 1

Views

Author

Juan Arias-de-Reyna, Mar 27 2015

Keywords

Comments

The sequence has asymptotics rho*n^3+O(n^2 log^2n) with rho=prod_p(1-3/p^2+2/p^3)=0.2867474284344...(product on primes). See A065473.

Examples

			a(3)=13 because the 13 triples (1,1,1), (1,1,2), (1,2,1), (2,1,1), (1,1,3), (1,3,1), (3,1,1), (1,2,3), (1,3,2), (2,1,3), (2,3,1), (3,1,2), (3,2,1).
		

Crossrefs

Cf. A256391.

Programs

  • Mathematica
    A[M_] := A[M] = Module[{X, a1, a2, a3, K, count, k},
        X = Flatten[
          Table[{a1, a2, a3}, {a1, 1, M}, {a2, 1, M}, {a3, 1, M}], 2];
        K = Length[X];
        count = 0;
        For[k = 1, k <= K, k++,
         {a1, a2, a3} = X[[k]];
         If[(GCD[a1, a2] == 1) && (GCD[a2, a3] == 1) && (GCD[a3, a1] ==
             1), count = count + 1]];
        count];
    Table[A[n], {n, 1, 100}]

Formula

a(n) = sum_a sum_b sum_c mu(a) mu(b) mu(c) [n/gcd(a,b)][n/gcd(b,c)][n/gcd(c,a)], where mu(.) is Moebius function [x] integer part of x, and a,b,c run through natural numbers.

A319592 Decimal expansion of the probability that an integer 4-tuple is pairwise coprime.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Aug 27 2019

Keywords

Examples

			0.114884044080228788729251276701599097848713552687283...
		

Crossrefs

Programs

  • Mathematica
    $MaxExtraPrecision = 1000; nm = 1000; c = LinearRecurrence[{-2, 3}, {0, -12}, nm]; f[x_] := (1 - x)^3*(1 + 3*x); RealDigits[f[1/2]*f[1/3]*Exp[NSum[Indexed[c, k]*(PrimeZetaP[k] - 1/2^k - 1/3^k)/k, {k, 2, nm}, NSumTerms -> nm, WorkingPrecision -> nm]], 10, 100][[1]]
  • PARI
    prodeulerrat((1 - 1/p)^3 * (1 + 3/p)) \\ Amiram Eldar, Jun 29 2023

Formula

Equals Product_{p prime} (1 - 1/p)^3 * (1 + 3/p).

A015632 Number of ordered triples of integers from [ 1,n ] with no common factors between pairs.

Original entry on oeis.org

1, 2, 4, 6, 12, 14, 26, 33, 46, 52, 84, 91, 137, 152, 174, 199, 279, 295, 397, 425, 475, 513, 663, 692, 819, 876, 986, 1044, 1286, 1315, 1593, 1700, 1838, 1939, 2123, 2186, 2582, 2711, 2905, 3008, 3498, 3564, 4106, 4272, 4476, 4666, 5316, 5433, 5985
Offset: 1

Views

Author

Keywords

Programs

  • Haskell
    a015632 n = length [(x,y,z) | z <- [1..n], y <- [1..z], gcd y z == 1,
                                  x <- [1..y], gcd x z == 1, gcd x y == 1]
    -- Reinhard Zumkeller, Nov 14 2011

Formula

a(n) ~ k * n^3 where k is 1/6 * A065473 = 0.04779.... [Charles R Greathouse IV, Nov 14 2011]

A118261 Decimal expansion of probability of a weakly carefree couple.

Original entry on oeis.org

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

Views

Author

Eric W. Weisstein, Apr 20 2006

Keywords

Examples

			0.5697515829197101463296387...
		

References

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

Crossrefs

Programs

  • Mathematica
    $MaxExtraPrecision = 1000; digits = 100; terms = 2000; LR = Join[{0, 0}, LinearRecurrence[{-2, 0, 1}, {-2, 3, -6}, terms + 10]]; r[n_Integer] := LR[[n]];
    K1 = (6/Pi^2)*Exp[NSum[r[n]*(PrimeZetaP[n - 1]/(n - 1)), {n, 3, terms}, NSumTerms -> terms, WorkingPrecision -> digits + 10, Method -> "AlternatingSigns"]];
    K2 = NSum[-(2 + (-2)^n)*PrimeZetaP[n]/n, {n, 2, Infinity}, NSumTerms -> 2 digits, WorkingPrecision -> 3digits, Method -> "AlternatingSigns"]//Exp;
    RealDigits[2 K1 - K2, 10, digits][[1]] (* Jean-François Alcover, May 15 2016 *)
  • PARI
    2 * prodeulerrat(1 - (2*p-1)/p^3) - prodeulerrat(1 - (3*p-2)/(p^3)) \\ Amiram Eldar, Mar 03 2021

Formula

Equals 2*K1 - K2, where K1 = A065464 and K2 = A065473.

A169646 Number of squarefree numbers of form k*n, 1 <= k <= n.

Original entry on oeis.org

1, 1, 2, 0, 3, 2, 5, 0, 0, 3, 7, 0, 8, 5, 6, 0, 11, 0, 12, 0, 8, 9, 15, 0, 0, 10, 0, 0, 17, 8, 19, 0, 13, 13, 15, 0, 23, 15, 17, 0, 26, 11, 28, 0, 0, 18, 30, 0, 0, 0, 21, 0, 32, 0, 25, 0, 23, 23, 36, 0, 37, 25, 0, 0, 30, 18, 41, 0, 29, 22, 44, 0, 45, 30, 0, 0, 36, 22, 49, 0, 0, 32, 51, 0, 41, 34
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 05 2010

Keywords

Crossrefs

Programs

Formula

a(n) = A008966(n)*A073311(n).
a(A000040(n)) = A112929(n).
a(n) = Sum_{i=1..n} A008966(n*i). - Ridouane Oudra, Jul 24 2019
a(n) = (A118259(n) - A118259(n-1))/2, for n>1. - Ridouane Oudra, May 04 2025
Sum_{k=1..n} a(k) ~ c * n / 2, where c = Product_{p prime} (1 - (3*p-2)/(p^3)) (A065473). - Amiram Eldar, May 12 2025

A384531 Multiplicative sequence a(n) with a(p^e) = ((2*e+1) * p - 2*e) * p^(e-1) for prime p and e >= 0.

Original entry on oeis.org

1, 4, 7, 12, 13, 28, 19, 32, 33, 52, 31, 84, 37, 76, 91, 80, 49, 132, 55, 156, 133, 124, 67, 224, 105, 148, 135, 228, 85, 364, 91, 192, 217, 196, 247, 396, 109, 220, 259, 416, 121, 532, 127, 372, 429, 268, 139, 560, 217, 420, 343, 444, 157, 540, 403, 608, 385, 340, 175, 1092
Offset: 1

Views

Author

Werner Schulte, Jun 01 2025

Keywords

Crossrefs

Programs

  • Maple
    A384531 := proc(n)
        local a,pe,p,e;
        a :=1 ;
        for pe in ifactors(n)[2] do
            p := op(1,pe) ;
            e := op(2,pe) ;
            a := a*((2*e+1) * p - 2*e) * p^(e-1) ;
        end do:
        a ;
    end proc:
    seq(A384531(n),n=1..100) ;# R. J. Mathar, Jun 04 2025
  • Mathematica
    f[p_, e_] := ((2*e+1)*p - 2*e)*p^(e-1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jun 01 2025 *)
  • PARI
    a(n)=my(f=factor(n)); prod(k=1,#f[,1],((2*f[k,2]+1)*f[k,1]-2*f[k,2])*f[k,1]^(f[k,2]-1))
    
  • Python
    from math import prod
    from sympy import factorint
    def A384531(n): return prod((((m:=e<<1)|1)*p-m)*p**(e-1) for p, e in factorint(n).items()) # Chai Wah Wu, Jun 03 2025

Formula

Dirichlet g.f.: Sum_{n > 0} a(n) / n^s = (zeta(s-1))^2 * Product_{p prime} (1 + (p-2) / p^s).
Dirichlet convolution of A018804 and A173557.
Conjecture: a(n) = Sum_{i=1..n} gcd(i, n) * gcd(i+1, n).
From Vaclav Kotesovec, Jun 04 2025: (Start)
Let f(s) = Product_{primes p} (1 + 2/p^(2*s-1) - 1/p^(2*s-2) - 2/p^s).
Dirichlet g.f.: zeta(s-1)^3 * f(s).
Sum_{k=1..n} a(k) ~ f(2) * n^2 * (log(n)^2 + (6*gamma - 1 + 2*f'(2)/f(2))*log(n) + 1/2 - 3*gamma + 6*gamma^2 - 6*sg1 + (6*gamma - 1)*f'(2)/f(2) + f''(2)/f(2))/4, where
f(2) = Product_{primes p} (1 - 3/p^2 + 2/p^3) = A065473 = 0.2867474284344787341...,
f'(2) = f(2) * Sum_{primes p} 4*log(p)/(p^2 + p - 2) = 0.53488225650873164189786660885838556843579696135554271633442328...,
f''(2) = f'(2)^2/f(2) + f(2) * Sum_{primes p} (-2*p*(3*p+2)*log(p)^2 / (p^2+p-2)^2) = -0.29112624105319980992840485620511000074444413707069816872854442...,
gamma is the Euler-Mascheroni constant A001620 and sg1 is the first Stieltjes constant (see A082633). (End)

A273093 Decimal expansion of the probability that three positive integers are pairwise not coprime.

Original entry on oeis.org

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

Views

Author

Jean-François Alcover, May 15 2016

Keywords

Examples

			0.1742197830347247005585740721805346916511057518703135572332637051646...
		

References

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

Crossrefs

Programs

  • Mathematica
    $MaxExtraPrecision = 1000; digits = 100; terms = 2000; LR = Join[{0, 0}, LinearRecurrence[{-2, 0, 1}, {-2, 3, -6}, terms + 10]]; r[n_Integer] := LR[[n]];
    P = (6/Pi^2)*Exp[NSum[r[n]*(PrimeZetaP[n - 1]/(n - 1)), {n, 3, terms}, NSumTerms -> terms, WorkingPrecision -> digits + 10, Method -> "AlternatingSigns"]];
    Q = NSum[-(2 + (-2)^n)*PrimeZetaP[n]/n, {n, 2, Infinity}, NSumTerms -> 2 digits, WorkingPrecision -> 3digits, Method -> "AlternatingSigns"]//Exp;
    F3 = 1 - 18/Pi^2 + 3P - Q;
    RealDigits[F3, 10, digits][[1]]
  • PARI
    1 - 3/zeta(2) + 3 * prodeulerrat(1 - (2*p-1)/p^3) - prodeulerrat(1 - (3*p-2)/p^3) \\ Amiram Eldar, Mar 03 2021

Formula

Equals 1 - 18/Pi^2 + 3P - Q, where P is A065464 and Q is A065473.

A319593 Decimal expansion of the probability that an integer triple is pairwise unitary coprime.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Aug 27 2019

Keywords

Comments

Two numbers are unitary coprime if their largest common unitary divisor is 1.

Examples

			0.552306904157942811183227347309264708535455831404497...
		

References

  • Steven R. Finch, Mathematical Constants II, Cambridge University Press, 2018, p. 54.

Crossrefs

Programs

  • Mathematica
    $MaxExtraPrecision = 1000; nm = 1000; f[x_] := 1 - 4*x^2 + 7*x^3 - 9*x^4 + 8*x^5 - 2*x^6 - 3*x^7 + 2*x^8; c = LinearRecurrence[{-1, 3, -4, 5, -3, -1, 2}, {0, -8, 21, -68, 180, -503, 1428}, nm]; RealDigits[f[1/2] * f[1/3] * Zeta[2] * Zeta[3] * Exp[NSum[Indexed[c, k]*(PrimeZetaP[k] - 1/2^k - 1/3^k)/k, {k, 2, nm}, NSumTerms -> nm, WorkingPrecision -> nm]], 10, 100][[1]]
  • PARI
    zeta(2) * zeta(3) * prodeulerrat(1-4/p^2+7/p^3-9/p^4+8/p^5-2/p^6-3/p^7+2/p^8) \\ Amiram Eldar, Jun 29 2023

Formula

Equals zeta(2) * zeta(3) * Product_{p prime} (1 - 4/p^2 + 7/p^3 - 9/p^4 + 8/p^5 - 2/p^6 - 3/p^7 + 2/p^8).
Previous Showing 21-28 of 28 results.