OFFSET
1,1
COMMENTS
The number of divisors of a(n) is a power of 2, and sum of even divisors = 2^(m+1), sum of odd divisors = 2^m for some m.
a(n) == 2, 6 (mod 8) or a(n) == 2, 6 (mod 12).
a(n) is of the form 2*p1*p2*...pk where p1, p2, ..., pk are Mersenne primes = 3, 7, 31, 127, 8191, ... (see A000668).
EXAMPLE
62 is a term because its divisors are 1, 2, 31 and 62, the sum of the even divisors of 62 = 62 + 2 = 2^6, the sum of odd divisors = 1 + 31 = 2^5, and phi(2^6) = 2^5.
MAPLE
with(numtheory):
for n from 2 by 2 to 10^6 do:
x:=divisors(n):n1:=nops(x):s0:=0:s1:=0:
for k from 1 to n1 do:
if irem(x[k], 2)=0
then
s0:=s0+ x[k]:
else
s1:=s1+ x[k]:
fi:
od:
if s1=phi(s0)
then
print(n):
else
fi:
od:
MATHEMATICA
Select[2 * Range[10^6], (sodd = (s = DivisorSigma[1, #])/(2^(IntegerExponent[#, 2]+1) - 1)) == EulerPhi[s - sodd] &] (* Amiram Eldar, Aug 12 2023 *)
PROG
(PARI) isok(n) = eulerphi(sumdiv(n, d, d*((d % 2)==0))) == sumdiv(n, d, d*(d%2)); \\ Michel Marcus, Jan 28 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jan 28 2017
EXTENSIONS
a(1) inserted by Amiram Eldar, Aug 12 2023
STATUS
approved