This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A171641 #24 May 08 2025 08:56:20 %S A171641 738,748,774,846,954,1062,1098,1206,1278,1314,1422,1494,1602,1746, %T A171641 1818,1854,1926,1962,2034,2286,2358,2466,2502,2682,2718,2826,2934, %U A171641 3006,3114,3222,3258,3438,3474,3492,3546,3582,3636,3708,3798,3852,3924,4014,4068,4086 %N A171641 Non-deficient numbers with even sigma which are not Zumkeller. %C A171641 Numbers which are non-deficient (sigma(n) >= 2n) [A023196] such that sigma(n) [A000203] is even but which are not Zumkeller numbers [A083207], i.e., the positive factors of n cannot be partitioned into two disjoint parts so that the sums of the two parts are equal. %H A171641 Amiram Eldar, <a href="/A171641/b171641.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Chai Wah Wu) %H A171641 Peter Luschny, <a href="http://www.luschny.de/math/seq/ZumkellerNumbers.html"> Zumkeller Numbers</a>. %p A171641 with(NumberTheory): %p A171641 isA171641 := proc(n) local s, p, i, P; %p A171641 s := SumOfDivisors(n); %p A171641 if s::odd or s < n*2 then false else %p A171641 P := mul(1 + x^i, i in Divisors(n)); %p A171641 0 = coeff(P, x, s/2) fi end: %p A171641 select(isA171641, [seq(1..4100)]); # _Peter Luschny_, Oct 19 2024 %t A171641 Reap[For[n = 2, n <= 4000, n = n+2, sigma = DivisorSigma[1, n]; If[sigma >= 2n && EvenQ[sigma] && Coefficient[ Times @@ (1 + x^Divisors[n]) // Expand, x, sigma/2] == 0, Print[n]; Sow[n]]]][[2, 1]] (* _Jean-François Alcover_, Jul 26 2013 *) %o A171641 (Python) %o A171641 from sympy import divisors %o A171641 import numpy as np %o A171641 A171641 = [] %o A171641 for n in range(2,10**6): %o A171641 d = divisors(n) %o A171641 s = sum(d) %o A171641 if not s % 2 and 2*n <= s: %o A171641 d.remove(n) %o A171641 s2, ld = int(s/2-n), len(d) %o A171641 z = np.zeros((ld+1,s2+1),dtype=int) %o A171641 for i in range(1,ld+1): %o A171641 y = min(d[i-1],s2+1) %o A171641 z[i,range(y)] = z[i-1,range(y)] %o A171641 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 A171641 if z[ld,s2] != s2: %o A171641 A171641.append(n) %o A171641 # _Chai Wah Wu_, Aug 19 2014 %Y A171641 Cf. A000203, A023196, A083207. %Y A171641 Setwise difference A083211 \ A156903. %Y A171641 Positions of even negative terms in A378600. %K A171641 nonn %O A171641 1,1 %A A171641 _Peter Luschny_, Dec 14 2009