%I #9 Aug 20 2014 20:41:25
%S 945,1575,2205,2835,3465,4095,4725,6435,6615,6825,7245,7425,7875,8085,
%T 8505,8925,9135,9555,9765,10395,11655,12285,12915,13545,14805,15015,
%U 16065,16695,17955,18585,19215,19635,19845,20475,21105,21735,22275,22365,22995,23205
%N Odd numbers in A192274.
%H Chai Wah Wu, <a href="/A243104/b243104.txt">Table of n, a(n) for n = 1..500</a>
%o (Python)
%o from sympy import divisors
%o import numpy as np
%o A243104 = []
%o for n in range(3,10**4,2):
%o ....d = divisors(n)
%o ....s = sum(d)
%o ....if not s % 2 and 2*n <= s:
%o ........d.remove(n)
%o ........s2, ld = int(s/2-n), len(d)
%o ........z = np.zeros((ld+1,s2+1),dtype=int)
%o ........for i in range(1,ld+1):
%o ............y = min(d[i-1],s2+1)
%o ............z[i,range(y)] = z[i-1,range(y)]
%o ............z[i,range(y,s2+1)] = np.maximum(z[i-1,range(y,s2+1)],z[i-1,range(0,s2+1-y)]+y)
%o ............if z[i,s2] == s2:
%o ................d2 = [2*x for x in d if n > 2*x and n % (2*x)] + \
%o ................[x for x in divisors(2*n-1) if n > x >=2 and n % x] + \
%o ................[x for x in divisors(2*n+1) if n > x >=2 and n % x]
%o ................s, dmax = sum(d2), max(d2)
%o ................if not s % 2 and 2*dmax <= s:
%o ....................d2.remove(dmax)
%o ....................s2, ld = int(s/2-dmax), len(d2)
%o ....................z = np.zeros((ld+1,s2+1),dtype=int)
%o ....................for i in range(1,ld+1):
%o ........................y = min(d2[i-1],s2+1)
%o ........................z[i,range(y)] = z[i-1,range(y)]
%o ........................z[i,range(y,s2+1)] = np.maximum(z[i-1,range(y,s2+1)],z[i-1,range(0,s2+1-y)]+y)
%o ........................if z[i,s2] == s2:
%o ............................A243104.append(n)
%o ............................break
%o ................break
%Y Cf. A192274.
%K nonn
%O 1,1
%A _Chai Wah Wu_, Aug 19 2014
|