Talk:Proper divisors

From Rosetta Code
Revision as of 19:11, 16 December 2014 by rosettacode>Mwn3d (→‎Dupe?: Still doesn't seem like enough for a separate task)

Dupe?

The explanation on the J implementation here makes a good point: is this task just a trivial change of Factors of an integer? --Mwn3d (talk) 17:09, 16 December 2014 (UTC)

Yep, it is allied, but deficient, perfect, abundant number classifications as well as Amicable pairs are based on them. --Paddy3118 (talk) 18:34, 16 December 2014 (UTC)
It seems like it'd be easier to just use the "proper divisors" definition in other tasks where appropriate rather than having a separate task with essentially the same code (except for maybe esoteric languages). Especially since any definition with "factors of an integer" could be made using "proper divisors" with one or two extra additions or subtractions. It just doesn't seem worth it. It looks to me like having a task to "print the number 3" and another task to "print the number before 4". --Mwn3d (talk) 19:11, 16 December 2014 (UTC)

Definition

I don't believe the definition used is correct. In particular "always includes 1" doesn't follow from the definition given at the linked site, or MathWorld or OEIS.

A simple definition from Mathworld: "A positive proper divisor is a positive divisor of a number n, excluding n itself."

From which we see that 1 will always divide an integer without remainder. I make a point about mentioning 1 as a reference stated that sometimes the same term "proper divisors" is used when 1 is excluded. --Paddy3118 (talk) 18:25, 16 December 2014 (UTC)