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 A033879 #164 Jul 18 2025 11:44:33 %S A033879 1,1,2,1,4,0,6,1,5,2,10,-4,12,4,6,1,16,-3,18,-2,10,8,22,-12,19,10,14, %T A033879 0,28,-12,30,1,18,14,22,-19,36,16,22,-10,40,-12,42,4,12,20,46,-28,41, %U A033879 7,30,6,52,-12,38,-8,34,26,58,-48,60,28,22,1,46,-12,66,10,42,-4,70,-51 %N A033879 Deficiency of n, or 2n - (sum of divisors of n). %C A033879 Records for the sequence of the absolute values are in A075728 and the indices of these records in A074918. - _R. J. Mathar_, Mar 02 2007 %C A033879 a(n) = 1 iff n is a power of 2. a(n) = n - 1 iff n is prime. - _Omar E. Pol_, Jan 30 2014 %C A033879 If a(n) = 1 then n is called a least deficient number or an almost perfect number. All the powers of 2 are least deficient numbers but it is not known if there exists a least deficient number that is not a power of 2. See A000079. - _Jianing Song_, Oct 13 2019 %C A033879 It is not known whether there are any -1's in this sequence. See comment in A033880. - _Antti Karttunen_, Feb 02 2020 %D A033879 Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section B2, pp. 74-84. %D A033879 James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 147. %H A033879 N. J. A. Sloane, <a href="/A033879/b033879.txt">Table of n, a(n) for n = 1..25000</a> [First 2000 terms from T. D. Noe, terms up to 16384 from Antti Karttunen] %H A033879 Nichole Davis, Dominic Klyve and Nicole Kraght, <a href="http://dx.doi.org/10.2140/involve.2013.6.493">On the difference between an integer and the sum of its proper divisors</a>, Involve, Vol. 6 (2013), No. 4, 493-504; DOI: 10.2140/involve.2013.6.493. %H A033879 Jose A. B. Dris, <a href="https://arxiv.org/abs/1610.01868">Conditions Equivalent to the Descartes-Frenicle-Sorli Conjecture on Odd Perfect Numbers</a>, arXiv preprint arXiv:1610.01868 [math.NT], 2016. %H A033879 Jose Arnaldo B. Dris, <a href="https://arxiv.org/abs/1703.09077">Analysis of the Ratio D(n)/n</a>, arXiv:1703.09077 [math.NT], 2017. %H A033879 Jose Arnaldo Bebita Dris, <a href="http://nntdm.net/volume-23-2017/number-4/01-13/">On a curious biconditional involving the divisors of odd perfect numbers</a>, Notes on Number Theory and Discrete Mathematics, 23(4) (2017), 1-13. %H A033879 Jose Arnaldo Bebita Dris and Immanuel Tobias San Diego, <a href="https://arxiv.org/abs/2002.12139">Some Modular Considerations Regarding Odd Perfect Numbers</a>, arXiv:2002.12139 [math.NT], 2020. %H A033879 Jose Arnaldo Bebita Dris and Doli-Jane Uvales Tejada, <a href="https://doi.org/10.7546/nntdm.2018.24.3.62-67">Conditions equivalent to the Descartes-Frenicle-Sorli Conjecture on odd perfect numbers - Part II</a>, Notes on Number Theory and Discrete Mathematics (2018) Vol. 24, No. 3, 62-67. %H A033879 Jose Arnaldo Bebita Dris and Doli-Jane Uvales Tejada, <a href="https://doi.org/10.7546/nntdm.2019.25.1.199-205">A note on the OEIS sequence A228059</a>, Notes on Number Theory and Discrete Mathematics (2019) Vol. 25, No. 1, 199-205. %H A033879 <a href="/index/Si#SIGMAN">Index entries for sequences related to sigma(n)</a>. %F A033879 a(n) = -A033880(n). %F A033879 a(n) = A005843(n) - A000203(n). - _Omar E. Pol_, Dec 14 2008 %F A033879 a(n) = n - A001065(n). - _Omar E. Pol_, Dec 27 2013 %F A033879 G.f.: 2*x/(1 - x)^2 - Sum_{k>=1} k*x^k/(1 - x^k). - _Ilya Gutkovskiy_, Jan 24 2017 %F A033879 a(n) = A286385(n) - A252748(n). - _Antti Karttunen_, May 13 2017 %F A033879 From _Antti Karttunen_, Dec 29 2017: (Start) %F A033879 a(n) = Sum_{d|n} A083254(d). %F A033879 a(n) = Sum_{d|n} A008683(n/d)*A296075(d). %F A033879 a(n) = A065620(A295881(n)) = A117966(A295882(n)). %F A033879 a(n) = A294898(n) + A000120(n). %F A033879 (End) %F A033879 From _Antti Karttunen_, Jun 03 2019: (Start) %F A033879 Sequence can be represented in arbitrarily many ways as a difference of the form (n - f(n)) - (g(n) - n), where f and g are any two sequences whose sum f(n)+g(n) = sigma(n). Here are few examples: %F A033879 a(n) = A325314(n) - A325313(n) = A325814(n) - A034460(n) = A325978(n) - A325977(n). %F A033879 a(n) = A325976(n) - A325826(n) = A325959(n) - A325969(n) = A003958(n) - A324044(n). %F A033879 a(n) = A326049(n) - A326050(n) = A326055(n) - A326054(n) = A326044(n) - A326045(n). %F A033879 a(n) = A326058(n) - A326059(n) = A326068(n) - A326067(n). %F A033879 a(n) = A326128(n) - A326127(n) = A066503(n) - A326143(n). %F A033879 a(n) = A318878(n) - A318879(n). %F A033879 a(A228058(n)) = A325379(n). (End) %F A033879 Sum_{k=1..n} a(k) ~ c * n^2, where c = 1 - Pi^2/12 = 0.177532... . - _Amiram Eldar_, Dec 07 2023 %e A033879 For n = 10 the divisors of 10 are 1, 2, 5, 10, so the deficiency of 10 is 10 minus the sum of its proper divisors or simply 10 - 5 - 2 - 1 = 2. - _Omar E. Pol_, Dec 27 2013 %p A033879 with(numtheory): A033879:=n->2*n-sigma(n): seq(A033879(n), n=1..100); %t A033879 Table[2n-DivisorSigma[1,n],{n,80}] (* _Harvey P. Dale_, Oct 24 2011 *) %o A033879 (PARI) a(n)=2*n-sigma(n) \\ _Charles R Greathouse IV_, Oct 13 2016 %o A033879 (Python) %o A033879 from sympy import divisor_sigma %o A033879 def A033879(n): return (n<<1)-divisor_sigma(n) # _Chai Wah Wu_, Apr 13 2024 %o A033879 (SageMath) [2*n-sigma(n, 1) for n in range(1, 73)] # _Stefano Spezia_, Jul 18 2025 %Y A033879 Cf. A000396 (positions of zeros), A005100 (of positive terms), A005101 (of negative terms). %Y A033879 Cf. A000203, A033880, A074918, A075728, A192895, A286385, A286449, A295881, A295882. %Y A033879 Cf. A083254 (Möbius transform), A228058, A296074, A296075, A323910, A325636, A325826, A325970, A325976. %Y A033879 Cf. A141545 (positions of a(n) = -12). %Y A033879 For this sequence applied to various permutations of natural numbers and some other sequences, see A323174, A323244, A324055, A324185, A324546, A324574, A324575, A324654, A325379. %K A033879 sign,nice,easy %O A033879 1,3 %A A033879 _N. J. A. Sloane_ %E A033879 Definition corrected by _N. J. A. Sloane_, Jul 04 2005