This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A243104 Odd numbers in A192274. 1

%I

%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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 18 18:15 EDT 2019. Contains 327178 sequences. (Running on oeis4.)