Skip to main content
Commonmark migration
Source Link

Husk, 5 bytes

ṁΠuṖp

Try it online!

#How?

How?

ṁΠuṖp  - Full program, implicit input.

     p  - Prime factors.
    Ṗ   - Powerset.
   u    - Remove duplicates.
ṁΠ     - Get the product of each list, sum and implicitly output.

Thanks to Zgarb for the suggestions in chat!

Husk, 5 bytes

ṁΠuṖp

Try it online!

#How?

ṁΠuṖp  - Full program, implicit input.

     p  - Prime factors.
    Ṗ   - Powerset.
   u    - Remove duplicates.
ṁΠ     - Get the product of each list, sum and implicitly output.

Thanks to Zgarb for the suggestions in chat!

Husk, 5 bytes

ṁΠuṖp

Try it online!

How?

ṁΠuṖp  - Full program, implicit input.

     p  - Prime factors.
    Ṗ   - Powerset.
   u    - Remove duplicates.
ṁΠ     - Get the product of each list, sum and implicitly output.

Thanks to Zgarb for the suggestions in chat!

added 31 characters in body
Source Link
Mr. Xcoder
  • 42.5k
  • 9
  • 81
  • 214

Husk, 65 bytes

Σ†ΠuṖpṁΠuṖp

Try it online!Try it online!

#How?

Σ†ΠuṖpṁΠuṖp  - Full program, implicit input.

     p  - Prime factors.
    Ṗ   - Powerset.
   u    - Remove duplicates.
 †ΠṁΠ     - Get the product of each list.
Σ       -, Sumsum and implicitly output.

Thanks to Zgarb for the suggestions in chat!

Husk, 6 bytes

Σ†ΠuṖp

Try it online!

#How?

Σ†ΠuṖp  - Full program, implicit input.

     p  - Prime factors.
    Ṗ   - Powerset.
   u    - Remove duplicates.
 †Π     - Get the product of each list.
Σ       - Sum and implicitly output.

Husk, 5 bytes

ṁΠuṖp

Try it online!

#How?

ṁΠuṖp  - Full program, implicit input.

     p  - Prime factors.
    Ṗ   - Powerset.
   u    - Remove duplicates.
ṁΠ     - Get the product of each list, sum and implicitly output.

Thanks to Zgarb for the suggestions in chat!

Source Link
Mr. Xcoder
  • 42.5k
  • 9
  • 81
  • 214

Husk, 6 bytes

Σ†ΠuṖp

Try it online!

#How?

Σ†ΠuṖp  - Full program, implicit input.

     p  - Prime factors.
    Ṗ   - Powerset.
   u    - Remove duplicates.
 †Π     - Get the product of each list.
Σ       - Sum and implicitly output.