login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A246198 Half-Zumkeller numbers: numbers n whose proper positive divisors can be partitioned into two disjoint sets whose sums are equal. 5

%I

%S 6,12,20,24,28,30,40,42,48,54,56,60,66,70,78,80,84,88,90,96,102,104,

%T 108,112,114,120,126,132,138,140,150,156,160,168,174,176,180,186,192,

%U 198,204,208,210,216,220,222,224,225,228,234,240,246,252,258,260,264

%N Half-Zumkeller numbers: numbers n whose proper positive divisors can be partitioned into two disjoint sets whose sums are equal.

%C All even half-Zumkeller numbers are in A083207, i.e. they are Zumkeller numbers (see Clark et al. 2008). The first 47 terms coincide with A083207. 225 is the first number in the sequence that is not a Zumkeller number.

%D S. Clark et al., Zumkeller numbers, Mathematical Abundance Conference, April 2008.

%H Robert Israel, <a href="/A246198/b246198.txt">Table of n, a(n) for n = 1..9188</a> (n=1..1309 from Chai Wah Wu)

%H K. P. S. Bhaskara Rao and Yuejian Peng, <a href="http://dx.doi.org/10.1016/j.jnt.2012.09.020">On Zumkeller Numbers</a>, Journal of Number Theory, Volume 133, Issue 4, April 2013, pp. 1135-1155.

%e Proper divisors of 225 are 1, 3, 5, 9, 15, 25, 45, 75 and 1+3+15+25+45=5+9+75.

%p filter:= proc(n) local L,s,t,nL,B,j,k;

%p L:= numtheory:-divisors(n) minus {n};

%p s:= convert(L,`+`);

%p if s::odd then return false fi;

%p t:= s/2;

%p nL:= nops(L);

%p B:= Array(0..t,1..nL);

%p B[0,1]:= 1;

%p B[L[1],1]:= 1;

%p for j from 2 to nL do

%p B[..,j]:= B[..,j-1];

%p for k from L[j] to t do

%p B[k,j]:= B[k,j] + B[k-L[j],j-1]

%p od:

%p if B[t,j] > 0 then return true fi;

%p od:

%p false

%p end:

%p select(filter, [$2..300]); # _Robert Israel_, Aug 19 2014

%t filterQ[n_] := Module[{L, s, t, nL, B, j, k},

%t L = Most[Divisors[n]];

%t s = Total[L];

%t If[OddQ[s], Return[False]];

%t t = s/2;

%t nL = Length[L];

%t B[_, _] = 0;

%t B[0, 1] = 1;

%t B[L[[1]], 1] = 1;

%t For[j = 2, j <= nL, j++,

%t Do[B[k, j] = B[k, j-1], {k, 0, t}];

%t For[k = L[[j]], k <= t, k++,

%t B[k, j] = B[k, j] + B[k-L[[j]], j-1]

%t ];

%t If[ B[t, j] > 0, Return[True]];

%t ];

%t False

%t ];

%t Select[Range[2, 300], filterQ] (* _Jean-Fran├žois Alcover_, Mar 04 2019, after _Robert Israel_ *)

%t hzQ[n_] := Module[{d = Most @ Divisors[n], sum, x}, sum = Plus @@ d; EvenQ[sum] && CoefficientList[Product[1 + x^i, {i, d}], x][[1 + sum/2]] > 0]; Select[Range[2, 1000], hzQ] (* _Amiram Eldar_, May 03 2020 *)

%o (Python)

%o from sympy.combinatorics.subsets import Subset

%o from sympy import divisors

%o A246198 = []

%o for n in range(2,10**3):

%o ....d = divisors(n)

%o ....d.remove(n)

%o ....s, dmax = sum(d), max(d)

%o ....if not s % 2 and 2*dmax <= s:

%o ........d.remove(dmax)

%o ........s2 = s/2-dmax

%o ........for x in range(2**len(d)):

%o ............if sum(Subset.unrank_binary(x,d).subset) == s2:

%o ................A246198.append(n)

%o ................break

%o (Python)

%o from sympy import divisors

%o import numpy as np

%o A246198 = []

%o for n in range(2,10**3):

%o ....d = divisors(n)

%o ....d.remove(n)

%o ....s, dmax = sum(d), max(d)

%o ....if not s % 2 and 2*dmax <= s:

%o ........d.remove(dmax)

%o ........s2, ld = int(s/2-dmax), 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 ................A246198.append(n)

%o ................break

%o # _Chai Wah Wu_, Aug 19 2014

%Y Cf. A083207.

%K nonn

%O 1,1

%A _Chai Wah Wu_, Aug 18 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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 6 18:59 EDT 2020. Contains 334832 sequences. (Running on oeis4.)