Talk:Zumkeller numbers: Difference between revisions

m
 
Line 4:
if (n % 2 || d.size() >= 24)
return true;</pre>
99504 has 28 divisors and is not a zumkeller number.[[user horsth|Horsth]] 06:56, 9 May 2021 (UTC)<BR>
Testet with GO version:
<lang go>func main() {
fmt.Println("The first 220 Zumkeller numbers are:")
for i, count := 99500, 0; count < 5; i++ {
if isZumkeller(i) {
fmt.Printf("%3d ", i)</lang>
<pre>
99500 99510 99512 99516 99520 </pre>
Testet with cpp version:
<lang cpp>
int main() {
cout << "First 220 Zumkeller numbers:" << endl;
vector<uint> zumz;
for (uint n = 99500; zumz.size() < 5; n++)
if (isZum(n))
zumz.push_back(n);
cout << zumz << endl << endl;
...
// if we get here and n is odd or n has at least 24 divisors it's a zum!
if (n % 2 || d.size() >= 29)
return true;</lang>
<pre>
99500 99504 99510 99512 99516 </pre>
 
 
[[user horsth|Horsth]] 06:56, 9 May 2021 (UTC)
Anonymous user