This site is supported by donations to The OEIS Foundation.

 Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A065794 Numbers n such that the sum of all possible subsets of the digits in n, excluding n itself, sums to n. 1
 257982, 258564, 259146, 265707, 266193, 272754, 273336, 280383, 2176722, 2181960, 2309670, 2315448, 2320686, 4642524, 20096887, 20096935, 20097375, 20097423, 20206495, 20206543, 20207031, 40365992, 40366480, 40424038, 41102597, 41102645, 41103085 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS The b-file lists all the terms in this finite sequence. LINKS Vadim Sheviakov, list of all 52 terms EXAMPLE a(1) = 257982 because the sum of all proper subsets of 257982 equals 2 + 8 + 82 + 9 + 92 + 98 + 982 + 7 + 72 + 78 + 782 + 79 + 792 + 798 + 7982 + 5 + 52 + 58 + 582 + 59 + 592 + 598 + 5982 + 57 + 572 + 578 + 5782 + 579 + 5792 + 5798 + 57982 + 2 + 22 + 28 + 282 + 29 + 292 + 298 + 2982 + 27 + 272 + 278 + 2782 + 279 + 2792 + 2798 + 27982 + 25 + 252 + 258 + 2582 + 259 + 2592 + 2598 + 25982 + 257 + 2572 + 2578 + 25782 + 2579 + 25792 + 25798 = 257982 MATHEMATICA okQ[n_] := Module[{d=IntegerDigits[n]}, Total[FromDigits /@ Subsets[d]] == 2 n]; Reap[Do[If[okQ[n], Sow[n]], {n, 300000}]][[2, 1]] PROG (PARI) /* finds 8 digit terms */ for(n=10^7, 10^8-1, d8=Str(n-n\10*10); d7=Str((n-n\100*100)\10); d6=Str((n-n\1000*1000)\100); d5=Str((n-n\10^4*10^4)\1000); d4=Str((n-n\10^5*10^5)\10^4); d3=Str((n-n\10^6*10^6)\10^5); d2=Str((n-n\10^7*10^7)\10^6); d1=Str((n-n\10^8*10^8)\10^7); s=0-n; for(i1=0, 1, for(i2=0, 1, for(i3=0, 1, for(i4=0, 1, for(i5=0, 1, for(i6=0, 1, for(i7=0, 1, for(i8=0, 1, c=""; if(i1, c=concat(c, d1)); if(i2, c=concat(c, d2)); if(i3, c=concat(c, d3)); if(i4, c=concat(c, d4)); if(i5, c=concat(c, d5)); if(i6, c=concat(c, d6)); if(i7, c=concat(c, d7)); if(i8, c=concat(c, d8)); s=s+eval(c))))))))); if(n==s, print(n))) - Donovan Johnson (Delphi) procedure TForm1.Button1Click(Sender: TObject); var   i, j, jj, k, l, n, m, t:longint;   s:string;   a:array of longint; begin   n:=UpDown1.Position;   SetLength(a, n);   for i:=0 to n-1 do a[i]:=0;   t:=1;   for i:=0 to n-1 do begin     for j:=1 to trunc(power(2, n))-2 do begin       s:=IntToStr(t+trunc(power(10, n))); delete(s, 1, 1); l:=0; jj:=j;       for k:=1 to n do begin         if jj mod 2 = 1 then begin             delete(s, k-l, 1);             l:=l+1;         end;         jj:=jj div 2;       end;       a[i]:=a[i]+StrToInt(s);     end;     t:=10*t;   end;   for i:=t div 10 to t-1 do begin     m:=i; k:=0;     for j:=0 to n-1 do begin       k:=k+(m mod 10)*a[j];       m:=m div 10;     end;     if i=k then Edit1.Text:=Edit1.Text+IntToStr(k)+'  ';   end; end; {Vadim Sheviakov} CROSSREFS Sequence in context: A105657 A251883 A251165 * A206253 A157670 A252921 Adjacent sequences:  A065791 A065792 A065793 * A065795 A065796 A065797 KEYWORD base,nonn,fini,full AUTHOR Jonathan Ayres (jonathan.ayres(AT)btinternet.com), Nov 19 2001 EXTENSIONS a(15)-a(28) from Donovan Johnson, Jan 19 2011 a(29)-a(52) from Vadim Sheviakov, Jul 05 2011 STATUS approved

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

Last modified December 14 12:04 EST 2019. Contains 329979 sequences. (Running on oeis4.)