This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A030057 #62 Aug 22 2024 03:57:45 %S A030057 2,4,2,8,2,13,2,16,2,4,2,29,2,4,2,32,2,40,2,43,2,4,2,61,2,4,2,57,2,73, %T A030057 2,64,2,4,2,92,2,4,2,91,2,97,2,8,2,4,2,125,2,4,2,8,2,121,2,121,2,4,2, %U A030057 169,2,4,2,128,2,145,2,8,2,4,2,196,2,4,2,8,2,169,2,187,2,4,2,225,2,4,2,181 %N A030057 Least number that is not a sum of distinct divisors of n. %C A030057 a(n) = 2 if and only if n is odd. a(2^n) = 2^(n+1). - _Emeric Deutsch_, Aug 07 2005 %C A030057 a(n) > n if and only if n belongs to A005153, and then a(n) = sigma(n) + 1. - _Michel Marcus_, Oct 18 2013 %C A030057 The most frequent values are 2 (50%), 4 (16.7%), 8 (5.7%), 13 (3.2%), 16 (2.4%), 29 (1.3%), 32 (1%), 40, 43, 61, ... - _M. F. Hasler_, Apr 06 2014 %C A030057 The indices of records occur at the highly abundant numbers, excluding 3 and 10, if _Jaycob Coleman_'s conjecture at A002093 that all these numbers are practical numbers (A005153) is true. - _Amiram Eldar_, Jun 13 2020 %H A030057 David Wasserman and T. D. Noe, <a href="/A030057/b030057.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from David Wasserman) %e A030057 a(10)=4 because 4 is the least positive integer that is not a sum of distinct divisors (namely 1,2,5 and 10) of 10. %p A030057 with(combinat): with(numtheory): for n from 1 to 100 do div:=powerset(divisors(n)): b[n]:=sort({seq(sum(div[i][j],j=1..nops(div[i])),i=1..nops(div))}) od: for n from 1 to 100 do B[n]:={seq(k,k=0..1+sigma(n))} minus b[n] od: seq(B[n][1],n=1..100); # _Emeric Deutsch_, Aug 07 2005 %t A030057 a[n_] := First[ Complement[ Range[ DivisorSigma[1, n] + 1], Total /@ Subsets[ Divisors[n]]]]; Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Jan 02 2012 *) %o A030057 (Haskell) %o A030057 a030057 n = head $ filter ((== 0) . p (a027750_row n)) [1..] where %o A030057 p _ 0 = 1 %o A030057 p [] _ = 0 %o A030057 p (k:ks) x = if x < k then 0 else p ks (x - k) + p ks x %o A030057 -- _Reinhard Zumkeller_, Feb 27 2012 %o A030057 (Python) %o A030057 from sympy import divisors %o A030057 def A030057(n): %o A030057 c = {0} %o A030057 for d in divisors(n,generator=True): %o A030057 c |= {a+d for a in c} %o A030057 k = 1 %o A030057 while k in c: %o A030057 k += 1 %o A030057 return k # _Chai Wah Wu_, Jul 05 2023 %Y A030057 Cf. A002093, A005153, A093896, A119347. %Y A030057 Distinct elements form A030058. %Y A030057 Cf. A027750. %K A030057 nonn,nice,look %O A030057 1,1 %A A030057 _David W. Wilson_ %E A030057 Edited by _N. J. A. Sloane_, May 05 2007