login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A125225 Numbers n such that n-1 can be represented as a sum of a subset of divisors of n. 2

%I #18 Jul 23 2020 14:10:47

%S 1,2,4,6,8,12,16,18,20,24,28,30,32,36,40,42,48,54,56,60,64,66,70,72,

%T 78,80,84,88,90,96,100,104,108,112,120,126,128,132,140,144,150,156,

%U 160,162,168,176,180,192,196,198,200,204,208,210,216,220,224,228,234,240,252

%N Numbers n such that n-1 can be represented as a sum of a subset of divisors of n.

%C 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.

%C Such numbers can be used to construct inheritance puzzles of the type described by Premchand Anne (see link).

%C Does the sequence contain A005231 (the odd abundant numbers)? - _Robert Israel_, Aug 05 2016

%H T. D. Noe, <a href="/A125225/b125225.txt">Table of n, a(n) for n=1..1000</a>

%H Premchand Anne, <a href="http://www.jstor.org/stable/2687685">Egyptian fractions and the inheritance problem</a>, The College Mathematics Journal 29 (4) (1998) 296-300.

%e 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.

%p ss:= proc(n, S) local s, Sp; option remember;

%p if n = 0 then return true

%p elif S = {} then return false

%p fi;

%p s:= max(S);

%p if s > n then return procname(n, select(`<=`,S,n))

%p elif s = n then return true

%p fi;

%p s:= min(S);

%p Sp:= subs(s=NULL,S);

%p if s > n then false

%p else procname(n-s,Sp) or procname(n,Sp)

%p fi

%p end proc:

%p select(n -> ss(n-1, numtheory:-divisors(n)), [$1..1000]); # _Robert Israel_, Aug 05 2016

%t okQ[n_] := With[{dd = Divisors[n]}, AnyTrue[Range[Length[dd], 1, -1], AnyTrue[Subsets[dd, {#}], Total[#] == n-1&]&]]; okQ[1] = True;

%t Select[Range[1000], okQ] (* _Jean-François Alcover_, Jul 23 2020 *)

%o (PARI) padbin(n, len) = {b = binary(n); while(length(b) < len, b = concat(0, b);); b;}

%o 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

%Y Cf. A005835, A000225, A005153, A103288.

%K nonn

%O 1,2

%A _David Eppstein_, Jan 13 2007

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)