Skip to main content
added 19 characters in body
Source Link

Two numbers are considered amicable if the proper divisor sum of the first is the same as the second number, the second number's proper divisor sum is equal to the first number, and the first and second numbers aren't equal.

Let's define S(x) to be\$s(x)\$ represents the aliquot sum or proper divisor sum of x\$x\$. 220 and 284 are amicable because S(220) = 284\$s(220) = 284\$ and S(284) = 200\$s(284) = 200\$.

Your task is, unsurprisingly, to determine whether two inputted numbers are amicable or not. The inputs will be positive integers and you may output two distinct, consistent values for amicable or not.

This is OEIS sequence A259180

This is a so the shortest code wins.

Test cases

input, input => output 220, 284 => 1 52, 100 => 0 10744, 10856 => 1 174292, 2345 => 0 100, 117 => 0 6, 11 => 0 495, 495 => 0 6, 6 => 0 

Two numbers are considered amicable if the proper divisor sum of the first is the same as the second number, the second number's proper divisor sum is equal to the first number, and the first and second numbers aren't equal.

Let's define S(x) to be the proper divisor sum of x. 220 and 284 are amicable because S(220) = 284 and S(284) = 200.

Your task is, unsurprisingly, to determine whether two inputted numbers are amicable or not. The inputs will be positive integers and you may output two distinct, consistent values for amicable or not.

This is OEIS sequence A259180

This is a so the shortest code wins.

Test cases

input, input => output 220, 284 => 1 52, 100 => 0 10744, 10856 => 1 174292, 2345 => 0 100, 117 => 0 6, 11 => 0 495, 495 => 0 6, 6 => 0 

Two numbers are considered amicable if the proper divisor sum of the first is the same as the second number, the second number's proper divisor sum is equal to the first number, and the first and second numbers aren't equal.

\$s(x)\$ represents the aliquot sum or proper divisor sum of \$x\$. 220 and 284 are amicable because \$s(220) = 284\$ and \$s(284) = 200\$.

Your task is, unsurprisingly, to determine whether two inputted numbers are amicable or not. The inputs will be positive integers and you may output two distinct, consistent values for amicable or not.

This is OEIS sequence A259180

This is a so the shortest code wins.

Test cases

input, input => output 220, 284 => 1 52, 100 => 0 10744, 10856 => 1 174292, 2345 => 0 100, 117 => 0 6, 11 => 0 495, 495 => 0 6, 6 => 0 
Tweeted twitter.com/StackCodeGolf/status/953708863227822080
Post Reopened by Ørjan Johansen, Jo King, totallyhuman, Dennis
Post Closed as "Needs details or clarity" by CommunityBot, FlipTack, Xcali, qqq, NoOneIsHere
added 14 characters in body
Source Link

Two numbers are considered amicable if the proper divisor sum of the first is the same as the second number, the second number's proper divisor sum is equal to the first number, and the first and second numbers aren't equal.

Let's define S(x) to be the proper divisor sum of x. 220 and 284 are amicable because S(220) = 284 and S(284) = 200.

Your task is, unsurprisingly, to determine whether two inputted numbers are amicable or not. The inputs will be positive integers and you may output two distinct, consistent values for amicable or not.

This is OEIS sequence A259180

This is a so the shortest code wins.

Test cases

input, input => output 220, 284 => 1 52, 100 => 0 10744, 10856 => 1 174292, 2345 => 0 100, 117 => 0 6, 11 => 0 495, 495 => 0 6, 6 => 0 

Two numbers are considered amicable if the proper divisor sum of the first is the same as the second number, the second number's proper divisor sum is equal to the first number, and the first and second numbers aren't equal.

Let's define S(x) to be the proper divisor sum of x. 220 and 284 are amicable because S(220) = 284 and S(284) = 200.

Your task is, unsurprisingly, to determine whether two inputted numbers are amicable or not. The inputs will be positive integers and you may output two distinct, consistent values for amicable or not.

This is OEIS sequence A259180

This is a so the shortest code wins.

Test cases

input, input => output 220, 284 => 1 52, 100 => 0 10744, 10856 => 1 174292, 2345 => 0 100, 117 => 0 6, 11 => 0 495, 495 => 0 

Two numbers are considered amicable if the proper divisor sum of the first is the same as the second number, the second number's proper divisor sum is equal to the first number, and the first and second numbers aren't equal.

Let's define S(x) to be the proper divisor sum of x. 220 and 284 are amicable because S(220) = 284 and S(284) = 200.

Your task is, unsurprisingly, to determine whether two inputted numbers are amicable or not. The inputs will be positive integers and you may output two distinct, consistent values for amicable or not.

This is OEIS sequence A259180

This is a so the shortest code wins.

Test cases

input, input => output 220, 284 => 1 52, 100 => 0 10744, 10856 => 1 174292, 2345 => 0 100, 117 => 0 6, 11 => 0 495, 495 => 0 6, 6 => 0 
added 76 characters in body
Source Link

Two numbers are considered amicable if the proper divisor sum of the first is the same as the second number, and the second number's proper divisor sum is equal to the first number, and the first and second numbers aren't equal.

Let's define S(x) to be the proper divisor sum of x. 220 and 284 are amicable because S(220) = 284 and S(284) = 200.

Your task is, unsurprisingly, to determine whether two inputted numbers are amicable or not. The inputs will be positive integers and you may output two distinct, consistent values for amicable or not.

This is OEIS sequence A259180

This is a so the shortest code wins.

Test cases

input, input => output 220, 284 => 1 52, 100 => 0 10744, 10856 => 1 174292, 2345 => 0 100, 117 => 0 6, 11 => 0 495, 495 => 0 

Two numbers are considered amicable if the proper divisor sum of the first is the same as the second number, and the second number's proper divisor sum is equal to the first number.

Let's define S(x) to be the proper divisor sum of x. 220 and 284 are amicable because S(220) = 284 and S(284) = 200.

Your task is, unsurprisingly, to determine whether two inputted numbers are amicable or not. The inputs will be positive integers and you may output two distinct, consistent values for amicable or not.

This is OEIS sequence A259180

This is a so the shortest code wins.

Test cases

input, input => output 220, 284 => 1 52, 100 => 0 10744, 10856 => 1 174292, 2345 => 0 100, 117 => 0 

Two numbers are considered amicable if the proper divisor sum of the first is the same as the second number, the second number's proper divisor sum is equal to the first number, and the first and second numbers aren't equal.

Let's define S(x) to be the proper divisor sum of x. 220 and 284 are amicable because S(220) = 284 and S(284) = 200.

Your task is, unsurprisingly, to determine whether two inputted numbers are amicable or not. The inputs will be positive integers and you may output two distinct, consistent values for amicable or not.

This is OEIS sequence A259180

This is a so the shortest code wins.

Test cases

input, input => output 220, 284 => 1 52, 100 => 0 10744, 10856 => 1 174292, 2345 => 0 100, 117 => 0 6, 11 => 0 495, 495 => 0 
added 18 characters in body
Source Link
Loading
added 20 characters in body
Source Link
Mr. Xcoder
  • 42.9k
  • 9
  • 87
  • 221
Loading
Source Link
Loading