OFFSET
0,2
REFERENCES
Joachim von zur Gathen and Jürgen Gerhard, Modern Computer Algebra, Cambridge University Press, Second Edition 2003, pp. 53-54. (See link below.)
LINKS
Joachim von zur Gathen and Jürgen Gerhard, Extract from "3.4. (Non-)Uniqueness of the gcd" chapter, Modern Computer Algebra, Cambridge University Press, Second Edition 2003, pp. 53-54.
Hugo Pfoertner, Illustration of a(2)=6087.
FORMULA
Lim_{n->infinity} a(n)/10^(2*n) = 6/Pi^2 = 1/zeta(2).
PROG
(Python)
import math
for n in range (0, 10):
counter = 0
for x in range (1, pow(10, n)+1):
for y in range(1, pow(10, n)+1):
if math.gcd(y, x) == 1:
counter += 1
print(n, counter)
(Python)
from functools import lru_cache
@lru_cache(maxsize=None)
def A018805(n):
if n == 1: return 1
return n*n - sum(A018805(n//j) for j in range(2, n//2+1)) - (n+1)//2
print([A018805(10**n) for n in range(8)]) # Michael S. Branicky, Mar 18 2021
(PARI) a342586(n)=my(s, m=10^n); forfactored(k=1, m, s+=eulerphi(k)); s*2-1 \\ Bruce Garner, Mar 29 2021
(PARI) a342586(n)=my(s, m=10^n); forsquarefree(k=1, m, s+=moebius(k)*(m\k[1])^2); s \\ Bruce Garner, Mar 29 2021
CROSSREFS
a(n) = 2*A064018(n) - 1. - Hugo Pfoertner, Mar 16 2021
a(n) = A018805(10^n). - Michel Marcus, Mar 16 2021
Related counts of k-tuples:
5-tuples: A343282;
KEYWORD
nonn
AUTHOR
Karl-Heinz Hofmann, Mar 16 2021
EXTENSIONS
a(10) from Michael S. Branicky, Mar 18 2021
More terms using A064018 from Hugo Pfoertner, Mar 18 2021
Edited by N. J. A. Sloane, Jun 13 2021
STATUS
approved