cp's OEIS Frontend

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.

Showing 1-4 of 4 results.

A033879 Deficiency of n, or 2n - (sum of divisors of n).

Original entry on oeis.org

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, 0, 28, -12, 30, 1, 18, 14, 22, -19, 36, 16, 22, -10, 40, -12, 42, 4, 12, 20, 46, -28, 41, 7, 30, 6, 52, -12, 38, -8, 34, 26, 58, -48, 60, 28, 22, 1, 46, -12, 66, 10, 42, -4, 70, -51
Offset: 1

Views

Author

Keywords

Comments

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
a(n) = 1 iff n is a power of 2. a(n) = n - 1 iff n is prime. - Omar E. Pol, Jan 30 2014
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
It is not known whether there are any -1's in this sequence. See comment in A033880. - Antti Karttunen, Feb 02 2020

Examples

			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
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section B2, pp. 74-84.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 147.

Crossrefs

Cf. A000396 (positions of zeros), A005100 (of positive terms), A005101 (of negative terms).
Cf. A083254 (Möbius transform), A228058, A296074, A296075, A323910, A325636, A325826, A325970, A325976.
Cf. A141545 (positions of a(n) = -12).
For this sequence applied to various permutations of natural numbers and some other sequences, see A323174, A323244, A324055, A324185, A324546, A324574, A324575, A324654, A325379.

Programs

Formula

a(n) = -A033880(n).
a(n) = A005843(n) - A000203(n). - Omar E. Pol, Dec 14 2008
a(n) = n - A001065(n). - Omar E. Pol, Dec 27 2013
G.f.: 2*x/(1 - x)^2 - Sum_{k>=1} k*x^k/(1 - x^k). - Ilya Gutkovskiy, Jan 24 2017
a(n) = A286385(n) - A252748(n). - Antti Karttunen, May 13 2017
From Antti Karttunen, Dec 29 2017: (Start)
a(n) = Sum_{d|n} A083254(d).
a(n) = Sum_{d|n} A008683(n/d)*A296075(d).
a(n) = A065620(A295881(n)) = A117966(A295882(n)).
a(n) = A294898(n) + A000120(n).
(End)
From Antti Karttunen, Jun 03 2019: (Start)
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:
a(n) = A325314(n) - A325313(n) = A325814(n) - A034460(n) = A325978(n) - A325977(n).
a(n) = A325976(n) - A325826(n) = A325959(n) - A325969(n) = A003958(n) - A324044(n).
a(n) = A326049(n) - A326050(n) = A326055(n) - A326054(n) = A326044(n) - A326045(n).
a(n) = A326058(n) - A326059(n) = A326068(n) - A326067(n).
a(n) = A326128(n) - A326127(n) = A066503(n) - A326143(n).
a(n) = A318878(n) - A318879(n).
a(A228058(n)) = A325379(n). (End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = 1 - Pi^2/12 = 0.177532... . - Amiram Eldar, Dec 07 2023

Extensions

Definition corrected by N. J. A. Sloane, Jul 04 2005

A075728 Records in abs(sigma(n)-2*n) (absolute value of A033879).

Original entry on oeis.org

1, 2, 4, 6, 10, 12, 16, 18, 22, 28, 30, 36, 40, 42, 46, 52, 58, 60, 66, 70, 72, 78, 82, 88, 96, 100, 102, 106, 108, 112, 120, 126, 130, 136, 138, 148, 150, 156, 162, 166, 172, 178, 186, 190, 192, 196, 198, 210, 222, 226, 228, 232, 238, 264, 268, 270, 276, 280, 282, 292, 306
Offset: 1

Views

Author

N. J. A. Sloane, Oct 03 2002

Keywords

Comments

RECORDS transform of |A033879|.

Crossrefs

Cf. A033879, A074918. Different from A006093.

Programs

  • PARI
    lista(nn) = {rec = -1; for (n=1, nn, d = abs(sigma(n) - 2*n); if (d > rec, print1(d, ", "); rec = d;););} \\ Michel Marcus, Nov 02 2013

Extensions

Corrected name, Michel Marcus, Nov 02 2013

A053140 Odd primes that are not highly-imperfect numbers.

Original entry on oeis.org

181, 241, 251, 257, 263, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653
Offset: 1

Views

Author

Joseph L. Pe, Oct 03 2002

Keywords

Comments

The sequence of highly-imperfect numbers begins with 1 and the odd primes up to 113... then even numbers appear and some odd primes are left out.

Crossrefs

Cf. A074918.

Programs

  • Maple
    R:= NULL: count:= 0: m:= 0: q:= 1:
    for k from 1 do
      v:= abs(numtheory:-sigma(k)-2*k);
      if v > m then
        m:= v;
        V:= select(isprime,[seq(i,i=q .. k-1,2)]);
        count:= count + nops(V);
        R:= R, op(V);
        q:= k + 1 + (k mod 2);
        if count > 100 then break fi
      fi
    od:
    R; # Robert Israel, Jun 19 2025

Extensions

More terms from Sean A. Irvine, Dec 11 2021

A203621 Highly anti-imperfect numbers: numbers k that sets a record for the value of |sigma*(k)-k|, where sigma*(k) is the sum of the anti-divisors of k.

Original entry on oeis.org

1, 2, 7, 10, 13, 17, 22, 27, 28, 32, 38, 45, 52, 60, 63, 67, 77, 95, 105, 130, 137, 143, 157, 158, 175, 193, 203, 247, 297, 315, 357, 423, 462, 472, 473, 578, 675, 682, 742, 770, 787, 1012, 1138, 1215, 1417, 1463, 1732, 1957, 2047, 2048, 2327, 2363, 2632
Offset: 1

Views

Author

Paolo P. Lava, Jan 04 2012

Keywords

Comments

Anti-imperfect numbers are anti-deficient numbers or anti-abundant numbers.

Examples

			n=1. Anti-divisors: 0. |0-1|=1
n=2. Anti-divisors: 0. |0-2|=2
n=3. Anti-divisors: 2. |2-3|=1 less than 2: 3 is not in the sequence.
n=4. Anti-divisors: 3. |3-4|=1 less than 2: 4 is not in the sequence.
n=5. Anti-divisors: 2,3. |5-3|=2 equal to the maximum: 5 is not in the sequence.
n=6. Anti-divisors: 4. |4-6|=2 equal to the maximum: 6 is not in the sequence.
n=7. Anti-divisors: 2,3,5. |10-7|=3 new maximum: 7 is in the sequence.
		

Crossrefs

Programs

  • Maple
    P:=proc(i)
    local a,k,n,s;
    s:=0;
    for n from 1 to i do
      a:=0;
      for k from 2 to n-1 do if abs((n mod k)- k/2)<1 then a:=a+k; fi; od;
      if abs(n-a)>s then s:=abs(n-a); print(n); fi;
    od;
    end:
    P(3000);
  • Mathematica
    sig[n_] := Total[Cases[Range[2, n - 1], ?(Abs[Mod[n, #] - #/2] < 1 &)]]; d[n] := Abs[sig[n] - n]; s = {}; dm = -1; Do[If[(d1 = d[n]) > dm, dm = d1; AppendTo[s, n]], {n, 1, 2700}]; s (* Amiram Eldar, Jan 13 2022 after Michael De Vlieger at A066417 *)
Showing 1-4 of 4 results.