OFFSET
1,1
COMMENTS
Ratio: 1, 1, 5, 10, 78, 1, 109, 565,...
If the ratio is equal to 1 we have 10, 65, 20737 (A140362).
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..59 (terms < 10^11)
EXAMPLE
Aliquot parts of 10 are 1, 2, 5. The average of their squares is (1^2 + 2^2 + 5^2) / 3 = (1 + 4 + 25) / 3 = 30 / 3 = 10 and 10 / 10 = 1.
MAPLE
with(numtheory); P:=proc(q) local a, b, k, n;
for n from 2 to q do a:=sort([op(divisors(n))]);
b:=add(a[k]^2, k=1..nops(a)-1)/(nops(a)-1);
if type(b/n, integer) then lprint(n);
fi; od; end: P(10^6);
MATHEMATICA
Select[Range[10^6], Mod[Mean[Most[Divisors[#]^2]], #]==0&] (* Ivan N. Ianakiev, Mar 03 2015 *)
PROG
(PARI) isok(n) = (q=(sumdiv(n, d, (d!=n)*d^2)/(numdiv(n)-1))) && (type(q)=="t_INT") && ((q % n) == 0); \\ Michel Marcus, Feb 20 2015
(Python)
from __future__ import division
from sympy import factorint
A255245_list = []
for n in range(2, 10**9):
....s0 = s2 = 1
....for p, e in factorint(n).items():
........s0 *= e+1
........s2 *= (p**(2*(e+1))-1)//(p**2-1)
....q, r = divmod(s2-n**2, s0-1)
....if not (r or q % n):
........A255245_list.append(n) # Chai Wah Wu, Mar 08 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo P. Lava, Feb 20 2015
EXTENSIONS
More terms from Michel Marcus, Feb 20 2015
a(17)-a(24) from Chai Wah Wu, Mar 08 2015
a(25)-a(28) from Giovanni Resta, May 30 2016
STATUS
approved