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.

A175549 Number of triples (a, b, c) with gcd(a, b, c) = 1 and -n <= a,b,c <= n.

This page as a plain text file.
%I A175549 #20 Mar 31 2021 10:47:00
%S A175549 0,26,98,290,578,1154,1730,2882,4034,5762,7490,10370,12674,16706,
%T A175549 20162,24770,29378,36290,41474,50114,57026,66242,74882,87554,96770,
%U A175549 111170,123266,138818,152642,172802,186626,209666,228098,251138,271874,299522
%N A175549 Number of triples (a, b, c) with gcd(a, b, c) = 1 and -n <= a,b,c <= n.
%H A175549 Indranil Ghosh, <a href="/A175549/b175549.txt">Table of n, a(n) for n = 0..1000</a>
%F A175549 For n > 0, a(n) = 8*A090025(n) - 12*A018805(n) - 18.
%F A175549 a(n) = 2*n*(4*n^2 + 6*n + 3) - Sum_{j=2..n} a(floor(n/j)). - _Chai Wah Wu_, Mar 30 2021
%t A175549 Table[If[n>0, 8 * Sum[MoebiusMu[k] * ((Floor[n/k] + 1)^3 - 1), {k, 1, n}] - 24 * Sum[EulerPhi[k], {k, 1, n}] - 6, 0], {n, 0, 35}] (* _Indranil Ghosh_, Mar 11 2017 *)
%o A175549 (PARI) a(n)=if(n>0,8*sum(k=1,n,moebius(k)*((n\k+1)^3-1))-24*sum(k=1,n,eulerphi(k))-6)
%o A175549 (Python)
%o A175549 from functools import lru_cache
%o A175549 @lru_cache(maxsize=None)
%o A175549 def A175549(n):
%o A175549     if n == 0:
%o A175549         return 0
%o A175549     c, j = 0, 2
%o A175549     k1 = n//j
%o A175549     while k1 > 1:
%o A175549         j2 = n//k1 + 1
%o A175549         c += (j2-j)*A175549(k1)
%o A175549         j, k1 = j2, n//j2
%o A175549     return 4*n*(n - 1)*(2*n + 5)-c+26*(j-1)# _Chai Wah Wu_, Mar 30 2021
%Y A175549 Cf. A090025, A018805, A049691.
%K A175549 nonn
%O A175549 0,2
%A A175549 _Charles R Greathouse IV_, Jun 24 2010
%E A175549 Edited by _Charles R Greathouse IV_, Jul 19 2010