A318168 Reverse Erdős-Nicolas numbers: abundant numbers m such that the sum of the last k proper divisors of m is equal to m for some k.
18, 42, 54, 66, 78, 102, 114, 126, 138, 162, 174, 186, 196, 198, 222, 234, 246, 258, 282, 294, 306, 318, 342, 354, 366, 378, 402, 414, 426, 438, 462, 474, 486, 498, 522, 534, 546, 558, 582, 594, 606, 618, 642, 654, 666, 678, 702, 714, 726, 738, 762, 774, 786
Offset: 1
Keywords
Examples
196 is in the sequence since its proper divisors are 1, 2, 4, 7, 14, 28, 49, 98, and 7 + 14 + 28 + 49 + 98 = 196.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
subtr = If[#1 < #2, Throw[#1], #1 - #2] &; selDivs[n_] := Catch@Fold[subtr, n, Reverse[Rest[Most[Divisors[n]]]]]; s={}; Do[If[selDivs[n] == 0, AppendTo[s, n]], {n, 2, 1000}]; s
-
PARI
isok(n) = {my(d = Vecrev(divisors(n))); if (vecsum(d) > 2*n, my(s = 0); for (i=2, #d, s += d[i]; if (s == n, return(n)););); return (0);} \\ Michel Marcus, Aug 21 2018
Comments