OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..171
EXAMPLE
112 is in the sequence since the sum of its bi-unitary divisors is 1 + 2 + 7 + 8 + 14 + 16 + 56 + 112 = 216 and 2*112 - 216 = 8 is a bi-unitary divisor of 112.
MATHEMATICA
f[n_] := Select[Divisors[n], Function[d, CoprimeQ[d, n/d]]]; bsigma[m_] := DivisorSum[m, # &, Last@Intersection[f@#, f[m/#]] == 1 &]; biunitaryDivisorQ[ div_, n_] := If[Mod[#2, #1]==0, Last@Apply[Intersection, Map[Select[Divisors[#], Function[d, CoprimeQ[d, #/d]]]&, {#1, #2/#1}]]==1, False]& @@{div, n}; aQ[n_] := Module[{d=2n-bsigma[n]}, If[d<=0, False, biunitaryDivisorQ[d, n]]]; s={}; Do[ If[aQ[n], AppendTo[s, n]], {n, 1, 10000}]; s
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)));
biudivs(n) = select(x->(gcud(x, n/x)==1), divisors(n));
isok(n) = my(divs = biudivs(n), sig = vecsum(divs)); (sig < 2*n) && vecsearch(divs, 2*n-sig); \\ Michel Marcus, Apr 27 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar and Michael De Vlieger, Apr 22 2018
STATUS
approved