|
|
A342586
|
|
a(n) is the number of pairs (x,y) with 1 <= x, y <= 10^n and gcd(x,y)=1.
|
|
9
|
|
|
1, 63, 6087, 608383, 60794971, 6079301507, 607927104783, 60792712854483, 6079271032731815, 607927102346016827, 60792710185772432731, 6079271018566772422279, 607927101854119608051819, 60792710185405797839054887, 6079271018540289787820715707, 607927101854027018957417670303
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
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)
if n == 1: return 1
return n*n - sum(A018805(n//j) for j in range(2, n//2+1)) - (n+1)//2
(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
|
Related counts of k-tuples:
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|