%I #24 Aug 12 2024 12:02:25
%S 1,3,2,6,7,4,3,9,2,8,5,6,7,4,7,10,5,12,4,9,10,3,4,14,10,8,6,13,9,8,5,
%T 15,7,2,6,8,4,5,12,6,7,10,10,11,14,12,9,4,3,4,12,9,4,4,7,5,7,10,3,5,4,
%U 13,14,12,10,9,10,8,7,4,8,6,18,9,3,8,13,8,15,15,8,3,14,9,10,8,8,10,5,7,8,11,6,11,13,6
%N sigma_1(n) / phi(n) for balanced numbers.
%C sigma_1(n) is the sum of the divisors of n [same as sigma(n)] (A000203).
%H Jud McCranie, <a href="/A023897/b023897.txt">Table of n, a(n) for n = 1..10000</a> (first 800 terms from Vincenzo Librandi)
%t Select[ Array[ DivisorSigma[ 1, # ]/EulerPhi[ # ]&, 20000 ], IntegerQ ]
%o (Magma) [ q: n in [1..20000] | r eq 0 where q, r is Quotrem(SumOfDivisors(n), EulerPhi(n)) ]; // _Klaus Brockhaus_, Nov 09 2008
%o (Python)
%o from math import prod
%o from itertools import count, islice
%o from sympy import factorint
%o def A023897_gen(startvalue=1): # generator of terms >= startvalue
%o for m in count(max(startvalue,1)):
%o f = factorint(m)
%o q, r = divmod(prod(p**(e+2)-p for p,e in f.items()),m*prod((p-1)**2 for p in f))
%o if not r:
%o yield q
%o A023897_list = list(islice(A023897_gen(),20)) # _Chai Wah Wu_, Aug 12 2024
%Y Cf. A000010, A000203, A020492.
%K nonn
%O 1,2
%A _Olivier GĂ©rard_