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.

A082540 Number of ordered quadruples (a,b,c,d) with gcd(a,b,c,d)=1 (1 <= {a,b,c,d} <= n).

This page as a plain text file.
%I A082540 #31 Sep 13 2024 06:51:22
%S A082540 1,15,79,239,607,1199,2303,3823,6223,9279,13919,19183,27007,35743,
%T A082540 47519,60735,78719,97103,122447,148527,181839,216959,262543,306863,
%U A082540 365343,423855,495855,569055,661679,748527,862047,972191,1104831,1237247
%N A082540 Number of ordered quadruples (a,b,c,d) with gcd(a,b,c,d)=1 (1 <= {a,b,c,d} <= n).
%H A082540 Karl-Heinz Hofmann, <a href="/A082540/b082540.txt">Table of n, a(n) for n = 1..10000</a>
%F A082540 a(n) = Sum_{k=1..n} mu(k)*floor(n/k)^4.
%F A082540 a(n) is asymptotic to c*n^4 with c=0.92393....
%F A082540 Lim_{n->infinity} a(n)/n^4 = 1/zeta(4) = A215267 = 90/Pi^4. - _Karl-Heinz Hofmann_, Apr 11 2021
%F A082540 Lim_{n->infinity} n^4/a(n) =   zeta(4) = A013662 = Pi^4/90. - _Karl-Heinz Hofmann_, Apr 11 2021
%F A082540 a(n) = n^4 - Sum_{k=2..n} a(floor(n/k)). - _Seiichi Manyama_, Sep 13 2024
%o A082540 (PARI) a(n)=sum(k=1,n,moebius(k)*floor(n/k)^4)
%o A082540 (Python)
%o A082540 from functools import lru_cache
%o A082540 @lru_cache(maxsize=None)
%o A082540 def A082540(n):
%o A082540     if n == 0:
%o A082540         return 0
%o A082540     c, j = 1, 2
%o A082540     k1 = n//j
%o A082540     while k1 > 1:
%o A082540         j2 = n//k1 + 1
%o A082540         c += (j2-j)*A082540(k1)
%o A082540         j, k1 = j2, n//j2
%o A082540     return n*(n**3-1)-c+j # _Chai Wah Wu_, Mar 29 2021
%Y A082540 Column k=4 of A344527.
%Y A082540 Cf. A018805, A071778, A082544, A343978.
%Y A082540 Cf. A015634.
%K A082540 nonn
%O A082540 1,2
%A A082540 _Benoit Cloitre_, May 11 2003