OFFSET
1,1
COMMENTS
Semiprimes in the sequence: 22, 77, 611, 1073, 2033, 5293, 6031, 9983, 13969, 15947, 23489, 25241, 40301, 49901, 50249, 51101, 56759, 65017, 71677, 85079, 97217, 98099, 99101, .... - Robert Israel, Mar 29 2018
2^k is a term for all odd k > 1. - Michael S. Branicky, Aug 22 2021
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..1009 (terms below 10^9, terms 1..100 from Paolo P. Lava)
EXAMPLE
Aliquot parts of 77 are 1, 7, 11. Then (1^2 + 7^2 + 11^2)/(1 + 7 + 11) = 171/19 = 9.
MAPLE
with(numtheory): P:=proc(n)
if not isprime(n) and frac((add(p^2, p=divisors(n))-n^2)/(sigma(n)-n))=0
then n; fi; end: seq(P(i), i=2..35*10^3);
MATHEMATICA
aQ[n_] := CompositeQ[n] && Divisible[DivisorSigma[2, n] - n^2, DivisorSigma[1, n] - n]; Select[Range[33000], aQ] (* Amiram Eldar, Aug 17 2019 *)
PROG
(PARI) isok(n) = (n!=1) && !isprime(n) && (((sigma(n, 2) - n^2) % (sigma(n) - n)) == 0); \\ Michel Marcus, Mar 23 2018
(Python)
from sympy import divisors
def ok(n):
divs = divisors(n)[:-1]
return len(divs) > 1 and sum(d**2 for d in divs)%sum(divs) == 0
print(list(filter(ok, range(4, 32769)))) # Michael S. Branicky, Aug 22 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paolo P. Lava, Mar 22 2018
STATUS
approved