Jump to content

Factor-perfect numbers: Difference between revisions

→‎{{header|Wren}}: Added a final 48 for consistency with other examples.
m (→‎{{header|Phix}}: final 48 back in)
(→‎{{header|Wren}}: Added a final 48 for consistency with other examples.)
Line 344:
 
var listing = moreMultiples.call([1], Int.properDivisors(48))
listing.add([1, 48])
listing.sort { |l1, l2|
var c1 = l1.count
Line 355 ⟶ 354:
return false
}
listing.each { |l| l.add(48) }
listing.add([1, 48])
System.print("%(listing.count) sequences using first definition:")
Fmt.tprint("$-17n", listing, 4)
Line 380 ⟶ 381:
<pre>
48 sequences using first definition:
[1, 2, 48] [1, 2, 4, 48] [1, 2, 4, 8], 48] [1, 2, 4, 8, 16], 48]
[1, 2, 4, 8, 24], 48] [1, 2, 4, 12, 48] [1, 2, 4, 12, 24, 48] [1, 2, 4, 16], 48]
[1, 2, 4, 24], 48] [1, 2, 6, 48] [1, 2, 6, 12], 48] [1, 2, 6, 12, 24, 48]
[1, 2, 6, 24], 48] [1, 2, 8, 48] [1, 2, 8, 16], 48] [1, 2, 8, 24], 48]
[1, 2, 12, 48] [1, 2, 12, 24], 48] [1, 2, 16, 48] [1, 2, 24], 48]
[1, 3, 48] [1, 3, 6, 48] [1, 3, 6, 12, 48] [1, 3, 6, 12, 24, 48]
[1, 3, 6, 24], 48] [1, 3, 12, 48] [1, 3, 12, 24, 48] [1, 3, 24], 48]
[1, 4, 48] [1, 4, 8, 48] [1, 4, 8, 16, 48] [1, 4, 8, 24], 48]
[1, 4, 12, 48] [1, 4, 12, 24], 48] [1, 4, 16, 48] [1, 4, 24], 48]
[1, 6, 48] [1, 6, 12, 48] [1, 6, 12, 24, 48] [1, 6, 24], 48]
[1, 8, 48] [1, 8, 16, 48] [1, 8, 24, 48] [1, 12], 48]
[1, 12, 24, 48] [1, 16, 48] [1, 24, 48] [1, 48]
 
48 sequences using second definition:
9,488

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.