login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A125225
Numbers n such that n-1 can be represented as a sum of a subset of divisors of n.
2
1, 2, 4, 6, 8, 12, 16, 18, 20, 24, 28, 30, 32, 36, 40, 42, 48, 54, 56, 60, 64, 66, 70, 72, 78, 80, 84, 88, 90, 96, 100, 104, 108, 112, 120, 126, 128, 132, 140, 144, 150, 156, 160, 162, 168, 176, 180, 192, 196, 198, 200, 204, 208, 210, 216, 220, 224, 228, 234, 240, 252
OFFSET
1,2
COMMENTS
The definition is related to that for semiperfect numbers (A005835). Every practical number (A005153) belongs to this sequence but not necessarily vice versa; e.g., 70 is in this sequence but not practical. Every number n in this sequence has sigma(n) >= 2n-1 (A103288) but, despite being abundant, 102 is not in this sequence.
Such numbers can be used to construct inheritance puzzles of the type described by Premchand Anne (see link).
Does the sequence contain A005231 (the odd abundant numbers)? - Robert Israel, Aug 05 2016
LINKS
Premchand Anne, Egyptian fractions and the inheritance problem, The College Mathematics Journal 29 (4) (1998) 296-300.
EXAMPLE
70 is in this sequence because 70-1=69=35+14+10+7+2+1 and all numbers in the sum are divisors of 70.
MAPLE
ss:= proc(n, S) local s, Sp; option remember;
if n = 0 then return true
elif S = {} then return false
fi;
s:= max(S);
if s > n then return procname(n, select(`<=`, S, n))
elif s = n then return true
fi;
s:= min(S);
Sp:= subs(s=NULL, S);
if s > n then false
else procname(n-s, Sp) or procname(n, Sp)
fi
end proc:
select(n -> ss(n-1, numtheory:-divisors(n)), [$1..1000]); # Robert Israel, Aug 05 2016
MATHEMATICA
okQ[n_] := With[{dd = Divisors[n]}, AnyTrue[Range[Length[dd], 1, -1], AnyTrue[Subsets[dd, {#}], Total[#] == n-1&]&]]; okQ[1] = True;
Select[Range[1000], okQ] (* Jean-François Alcover, Jul 23 2020 *)
PROG
(PARI) padbin(n, len) = {b = binary(n); while(length(b) < len, b = concat(0, b); ); b; }
isok(n) = {if (n == 1, return (1)); d = divisors(n); nbd = #d; for (i = 1, 2^nbd-1, b = padbin(i, nbd); s = sum(j = 1, nbd, d[j]*b[j]); if (s == (n - 1), return (1)); ); return (0); } \\ Michel Marcus, Aug 30 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
David Eppstein, Jan 13 2007
STATUS
approved