[go: up one dir, main page]

login
A243104
Odd numbers in A192274.
1
945, 1575, 2205, 2835, 3465, 4095, 4725, 6435, 6615, 6825, 7245, 7425, 7875, 8085, 8505, 8925, 9135, 9555, 9765, 10395, 11655, 12285, 12915, 13545, 14805, 15015, 16065, 16695, 17955, 18585, 19215, 19635, 19845, 20475, 21105, 21735, 22275, 22365, 22995, 23205
OFFSET
1,1
LINKS
PROG
(Python)
from sympy import divisors
import numpy as np
A243104 = []
for n in range(3, 10**4, 2):
....d = divisors(n)
....s = sum(d)
....if not s % 2 and 2*n <= s:
........d.remove(n)
........s2, ld = int(s/2-n), len(d)
........z = np.zeros((ld+1, s2+1), dtype=int)
........for i in range(1, ld+1):
............y = min(d[i-1], s2+1)
............z[i, range(y)] = z[i-1, range(y)]
............z[i, range(y, s2+1)] = np.maximum(z[i-1, range(y, s2+1)], z[i-1, range(0, s2+1-y)]+y)
............if z[i, s2] == s2:
................d2 = [2*x for x in d if n > 2*x and n % (2*x)] + \
................[x for x in divisors(2*n-1) if n > x >=2 and n % x] + \
................[x for x in divisors(2*n+1) if n > x >=2 and n % x]
................s, dmax = sum(d2), max(d2)
................if not s % 2 and 2*dmax <= s:
....................d2.remove(dmax)
....................s2, ld = int(s/2-dmax), len(d2)
....................z = np.zeros((ld+1, s2+1), dtype=int)
....................for i in range(1, ld+1):
........................y = min(d2[i-1], s2+1)
........................z[i, range(y)] = z[i-1, range(y)]
........................z[i, range(y, s2+1)] = np.maximum(z[i-1, range(y, s2+1)], z[i-1, range(0, s2+1-y)]+y)
........................if z[i, s2] == s2:
............................A243104.append(n)
............................break
................break
CROSSREFS
Cf. A192274.
Sequence in context: A005231 A174865 A174535 * A006038 A287646 A316116
KEYWORD
nonn
AUTHOR
Chai Wah Wu, Aug 19 2014
STATUS
approved