OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
László Tóth, On the bi-unitary analogues of Euler's arithmetical function and the gcd-sum function, Journal of Integer Sequences, Vol. 12 (2009), Article 09.5.2.
FORMULA
a(n) = A*n^2/2 + O(n*log(n)^2), where A = A306071.
MATHEMATICA
bphi[1] = 1; bphi[n_] := With[{pp = Power @@@ FactorInteger[n]}, Count[Range[n], m_ /; Intersection[pp, Power @@@ FactorInteger[m]] == {}]]; Accumulate[Table[bphi[n], {n, 1, 100}]] (* after Jean-François Alcover at A116550 *)
phi[x_, n_] := DivisorSum[n, MoebiusMu[#]*Floor[x/#] &]; bphi[n_] := DivisorSum[n, (-1)^PrimeNu[#]*phi[n/#, #] &, CoprimeQ[#, n/#] &]; Accumulate[Array[bphi, 100]] (* Amiram Eldar, Jun 30 2025 *)
PROG
(PARI) udivs(n) = {my(d = divisors(n)); select(x->(gcd(x, n/x)==1), d); }
gcud(n, m) = vecmax(setintersect(udivs(n), udivs(m)));
bphi(n) = if (n==1, 1, sum(k=1, n-1, gcud(n, k) == 1));
a(n) = sum(k=1, n, bphi(k)); \\ Michel Marcus, Jun 20 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Jun 19 2018
STATUS
approved
