This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A255244 #38 May 22 2025 10:21:42 %S A255244 1,65,175,1105,5425,20737,32045,70525,103685,171275,200725,207553, %T A255244 352529,372775,1037765,1198925,1264957,1347905,1762645,1824877, %U A255244 2609425,2698189,3628975,3928475,4966975,6324785,6337175,8646625,8813225,9124385,10223341,12774139,13490945 %N A255244 Numbers that divide the average of the sum of the squares of their divisors. %H A255244 Chai Wah Wu and Giovanni Resta, <a href="/A255244/b255244.txt">Table of n, a(n) for n = 1..328</a> (terms < 10^12, first 82 terms from Chai Wah Wu) %e A255244 Divisors of 65 are 1, 5, 13, 65. The average of the sum of their squares is (1^2 + 5^2 + 13^2 + 65^2) / 4 = (1 + 25 + 169 + 4225) / 4 = 4420 / 4 = 1105 and 1105 / 65 = 17. %p A255244 with(numtheory); P:=proc(q) local a,b,k,n; %p A255244 for n from 2 to q do a:=divisors(n); %p A255244 b:=add(a[k]^2,k=1..nops(a))/nops(a); %p A255244 if type(b/n,integer) then lprint(n); %p A255244 fi; od; end: P(10^6); %t A255244 Select[Range[10^6],Mod[Mean[Divisors[#]^2],#]==0&] (* _Ivan N. Ianakiev_, Mar 03 2015 *) %o A255244 (PARI) isok(n) = (q=sumdiv(n, d, d^2)/numdiv(n)) && (type(q)=="t_INT") && ((q % n) == 0); \\ _Michel Marcus_, Feb 20 2015 %o A255244 (Python) %o A255244 from __future__ import division %o A255244 from sympy import factorint %o A255244 A255244_list = [] %o A255244 for n in range(1,10**9): %o A255244 s0 = s2 = 1 %o A255244 for p,e in factorint(n).items(): %o A255244 s0 *= e+1 %o A255244 s2 *= (p**(2*(e+1))-1)//(p**2-1) %o A255244 q, r = divmod(s2,s0) %o A255244 if not (r or q % n): %o A255244 A255244_list.append(n) # _Chai Wah Wu_, Mar 08 2015 %Y A255244 Cf. A000203, A255245. %K A255244 nonn %O A255244 1,2 %A A255244 _Paolo P. Lava_, Feb 20 2015 %E A255244 More terms from _Michel Marcus_, Feb 20 2015 %E A255244 a(31)-a(33) corrected by _Chai Wah Wu_, Mar 08 2015