Search: id:A005835
Results 1-1 of 1 results found.
%I A005835 M4094
%S A005835 6,12,18,20,24,28,30,36,40,42,48,54,56,60,66,72,78,80,84,88,90,96,100,
102,
%T A005835 104,108,112,114,120,126,132,138,140,144,150,156,160,162,168,174,176,180,
186,
%U A005835 192,196,198,200,204,208,210,216,220,222,224,228,234,240,246,252,258,260,
264
%N A005835 Pseudoperfect (or semiperfect) numbers n: some subset of the proper divisors
of n sums to n.
%C A005835 In other words, some subset of the numbers { 1 <= d < n : d divides n
} adds up to n. - N. J. A. Sloane (njas(AT)research.att.com), Apr
06 2008
%C A005835 Also, numbers n such that A033630(n) > 1. - Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com),
Mar 02 2007
%C A005835 By definition, does not include the weird numbers A006037.
%D A005835 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences,
Academic Press, 1995 (includes this sequence).
%D A005835 R. K. Guy, Unsolved Problems in Number Theory, B2.
%D A005835 Problem E2308, Amer. Math. Monthly, 79 (1972), 774.
%H A005835 T. D. Noe, Table of n, a(n) for n=1..1000
%H A005835 Anonymous,
Semiperfect Numbers: Definition
%H A005835 David Eppstein, Title?
%H A005835 Eric Weisstein's World of Mathematics, Link to a section of The World of Mathematics.
a>
%e A005835 6 = 1+2+3, 12 = 1+2+3+6, 18 = 3+6+9, etc.
%e A005835 70 is not a member since the proper divisors of 70 are {1, 2, 5, 7, 10,
14, 35} and no subset adds to 70.
%p A005835 with(combinat); issemiperfect := proc(n) local b, S; b:=false; S:=subsets(divisors(n)
minus {n}); while not S[finished] do if convert(S[nextvalue](),`+`)=n
then b:=true; break fi od; return b end: select(proc(z) issemiperfect(z)
end, [$1..1000]); - Walter A. Kehowski (wkehowski(AT)cox.net), Aug
12 2005
%t A005835 Flatten[ Position[ A033630, q_/; q>1 ] ] - from wouter.meeussen(at)pandora.be
%o A005835 (PARI from M. F. hasler, Apr 06 2008) isA005835(n, d=0)={ local(t); /
* Return nonzero iff n is the sum of a subset of d which defaults
to the set of proper divisors of n */
%o A005835 if( !d, /* Initialize d */ d=vecextract(divisors(n), "^-1"),/*else check
if n equals one element of d */ setsearch( Set(d), n) & return(1));
%o A005835 /* Remove terms > n */ while( #d>1 & d[ #d]>n, d=vecextract(d, "^-1"));
%o A005835 /* If n is not smaller than the sum of all terms, we're done */ n >=
(t = sum(i=1, #d, d[i])) & return( n==t );
%o A005835 /* If n is larger than M=max(d), then try to write n-M in terms of d
\ { M } */ n > d[ #d ] & isA005835( n - d[ #d ], vecextract( d, "^-1")
) & return(1); /* else only d \ {M} is needed */ isA005835( n, vecextract(
d, "^-1" ))}
%o A005835 for(n=1,1000,isA005835(n)&print1(n","))
%Y A005835 The complement is A136447.
%Y A005835 See A136446 for another version.
%Y A005835 Cf. A006036, A005100, A033630.
%Y A005835 Sequence in context: A119357 A097216 A023196 this_sequence A007620 A100715
A094519
%Y A005835 Adjacent sequences: A005832 A005833 A005834 this_sequence A005836 A005837
A005838
%K A005835 nonn,nice,easy
%O A005835 1,1
%A A005835 N. J. A. Sloane (njas(AT)research.att.com).
%E A005835 Better description and more terms from Jud McCranie (j.mccranie(AT)comcast.net)
Oct 15 1997
Search completed in 0.002 seconds