Skip to main content
deleted 81 characters in body
Source Link
Emigna
  • 53.2k
  • 5
  • 44
  • 164

05AB1E, 118 bytes

µNÈNNѨOQP½µNNѨOQ½ 

Try it online!

Explanation

µ  # loop over increasing N until counter equals input NÈ # push N is even   N # push N   NÑ # push factors of N   ¨ # remove last factor (itself)   O # sum factors   Q # sum(factors(N)) == N  compare the Psum to N #for productequality   ½  # if true, increase counter 

05AB1E, 11 bytes

µNÈNNѨOQP½ 

Try it online!

Explanation

µ  # loop over increasing N until counter equals input NÈ # push N is even   N # push N   NÑ # push factors of N   ¨ # remove last factor (itself)   O # sum factors   Q # sum(factors(N)) == N  P # product   ½ # if true, increase counter 

05AB1E, 8 bytes

µNNѨOQ½ 

Try it online!

Explanation

µ # loop over increasing N until counter equals input N # push N NÑ # push factors of N ¨ # remove last factor (itself) O # sum factors Q # compare the sum to N for equality ½  # if true, increase counter 
Source Link
Emigna
  • 53.2k
  • 5
  • 44
  • 164

05AB1E, 11 bytes

µNÈNNѨOQP½ 

Try it online!

Explanation

µ # loop over increasing N until counter equals input NÈ # push N is even N # push N NÑ # push factors of N ¨ # remove last factor (itself) O # sum factors Q # sum(factors(N)) == N P # product ½ # if true, increase counter