OFFSET
1,1
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
4 is a term since its divisors are 1, 2 and 4, and its unitary divisors are 1 and 4, and 4 - 2 + 1 = 4 - 1.
MATHEMATICA
q[n_] := Module[{d = Reverse[Divisors[n]], u}, u = Select[d, CoprimeQ[#, n/#] &]; Total[(-1)^(Range[Length[d]] + 1)*d] == Total[(-1)^(Range[Length[u]] + 1)*u]]; Select[Range[10^5], ! SquareFreeQ[#] && q[#] &]
PROG
(PARI) iseq(n) = my(d = Vecrev(divisors(n)), u = select(x->(gcd(x, n/x) == 1), d)); sum(i=1, #d, (-1)^(i+1)*d[i]) == sum(i=1, #u, (-1)^(i+1)*u[i]);
is(n) = !issquarefree(n) && iseq(n)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Feb 26 2024
STATUS
approved