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-10 of 13 results. Next

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. 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

A228058 Odd numbers of the form p^(1+4k) * r^2, where p is prime of the form 1+4m, r > 1, and gcd(p,r) = 1. (Euler's criteria for odd perfect numbers).

Original entry on oeis.org

45, 117, 153, 245, 261, 325, 333, 369, 405, 425, 477, 549, 605, 637, 657, 725, 801, 833, 845, 873, 909, 925, 981, 1017, 1025, 1053, 1233, 1325, 1341, 1377, 1413, 1421, 1445, 1525, 1557, 1573, 1629, 1737, 1773, 1805, 1813, 1825, 2009, 2057, 2061, 2097, 2169
Offset: 1

Views

Author

T. D. Noe, Aug 13 2013

Keywords

Comments

It has been proved that if an odd perfect number exists, it belongs to this sequence. The first term of the form p^5 * n^2 is 28125 = 5^5 * 3^2, occurring in position 520.
Sequence A228059 lists the subsequence of these numbers that are closer to being perfect than smaller numbers. - T. D. Noe, Aug 15 2013
Sequence A326137 lists terms with at least five distinct prime factors. See further comments there. - Antti Karttunen, Jun 13 2019

Crossrefs

Subsequence of A191218, and also of A228056 and A228057 (simpler versions of this sequence).
For various subsequences with additional conditions, see A228059, A325376, A325380, A325822, A326137 (with omega(n)>=5), A324898 (conjectured, subsequence if it does not contain any prime powers), A354362, A386425 (conjectured), A386427 (nondeficient terms), A386428 (powerful terms), A386429 U A351574.

Programs

  • Haskell
    import Data.List (partition)
    a228058 n = a228058_list !! (n-1)
    a228058_list = filter f [1, 3 ..] where
       f x = length us == 1 && not (null vs) &&
             fst (head us) `mod` 4 == 1 && snd (head us) `mod` 4 == 1
             where (us,vs) = partition (odd . snd) $
                             zip (a027748_row x) (a124010_row x)
    -- Reinhard Zumkeller, Aug 14 2013
    
  • Mathematica
    nn = 100; n = 1; t = {}; While[Length[t] < nn, n = n + 2; {p, e} = Transpose[FactorInteger[n]]; od = Select[e, OddQ]; If[Length[e] > 1 && Length[od] == 1 && Mod[od[[1]], 4] == 1 && Mod[p[[Position[e, od[[1]]][[1,1]]]], 4] == 1, AppendTo[t, n]]]; t (* T. D. Noe, Aug 15 2013 *)
  • PARI
    up_to = 1000;
    isA228058(n) = if(!(n%2)||(omega(n)<2),0,my(f=factor(n),y=0); for(i=1,#f~,if(1==(f[i,2]%4), if((1==y)||(1!=(f[i,1]%4)),return(0),y=1), if(f[i,2]%2, return(0)))); (y));
    A228058list(up_to) = { my(v=vector(up_to), k=0, n=0); while(kA228058(n), k++; v[k] = n)); (v); };
    v228058 = A228058list(up_to);
    A228058(n) = v228058[n]; \\ Antti Karttunen, Apr 22 2019

Formula

From Antti Karttunen, Apr 22 2019 & Jun 03 2019: (Start)
A325313(a(n)) = -A325319(n).
A325314(a(n)) = -A325320(n).
A001065(a(n)) = A325377(n).
A033879(a(n)) = A325379(n).
A034460(a(n)) = A325823(n).
A325814(a(n)) = A325824(n).
A324213(a(n)) = A325819(n).
(End)

Extensions

Note in parentheses added to the definition by Antti Karttunen, Jun 03 2019

A088012 Odd solutions to abs(sigma(k) - 2k) <= log(k). Numbers k whose abundance-radius does not exceed log(k).

Original entry on oeis.org

1155, 8925, 32445, 442365, 159030135, 815634435, 2586415095, 1956860570050575, 221753180448460815, 747406020889133775
Offset: 1

Views

Author

Keywords

Comments

This sequence should include odd perfect numbers too, if they exist.
From Walter Nissen, Dec 15 2005: (Start)
abundancy(k) k 2k sigma(k) abundance
1.99480519480519 1155 2310 2304 -6
2.00067226890756 8925 17850 17856 6
2.00018492834027 32445 64890 64896 6
2.00001356346004 442365 884730 884736 6
2.00000011318610 159030135 318060270 318060288 18
1.99999999264376 815634435 1631268870 1631268864 -6
2.00000000695943 2586415095 5172830190 5172830208 18
As it happens, abundance of these is -6, 6 or 18. This is not necessarily true for larger terms. (End)
See also A171929 and A188597 and A188263 for sequences of numbers (any / deficient / abundant) whose relative abundancy tends to 2. - M. F. Hasler, Feb 19 2017
3278298202600507814120339275775985 is also a term with abundance 30. In fact, it and 815634435 are the only odd terms known where abs(sigma(k)-2k) <= log_10(k). - Alexander Violette, Nov 05 2020; updated by Max Alekseyev, Jul 27 2025
Also includes 827880257692739174385 and 255286886041240176056063754225. - Max Alekseyev, Jul 27 2025

Examples

			1155 is in the sequence because sigma(1155) = 2304, giving 2*1155 - 2304 = 6, while natural log of 1155 is about 7.05.
From _M. F. Hasler_, Jul 18 2016: (Start)
We have the following factorizations:
1155 = 3 * 5 * 7 * 11,
8925 = 3 * 5^2 * 7 * 17,
32445 = 3^2 * 5 * 7 * 103,
442365 = 3 * 5 * 7 * 11 * 383,
159030135 = 3^5 * 5 * 11 * 73 * 163,
815634435 = 3 * 5 * 7 * 11 * 547 * 1291,
2586415095 = 3^2 * 5 * 11 * 31 * 41 * 4111.
The sequence appears to be a subsequence of A171929. (End)
		

Crossrefs

Programs

  • Mathematica
    abu[x_] := Abs[DivisorSigma[1, x]-2*x] Do[If[ !Greater[abu[n], Log[n]//N]&&OddQ[n], Print[n]], {n, 1, 100000}]
  • PARI
    is(n)=n%2 && abs(sigma(n)-2*n)<=log(n) \\ Charles R Greathouse IV, Feb 21 2017

Extensions

a(7) from Donovan Johnson, Dec 21 2008
a(9) from Alexander Violette confirmed and a(8), a(10) added by Max Alekseyev, Jul 27 2025

A171929 Odd numbers whose abundancy is closer to 2 than any smaller odd number.

Original entry on oeis.org

1, 3, 9, 15, 45, 105, 315, 1155, 7425, 8415, 8925, 31815, 32445, 351351, 442365, 13800465, 14571585, 16286445, 20355825, 20487159, 78524145, 132701205, 159030135, 815634435, 2586415095, 29169504045, 40833636525, 125208115065
Offset: 1

Views

Author

Sergio Pimentel, Jan 05 2010

Keywords

Comments

The (relative) abundancy of n is sigma(n)/n, not sigma(n) - 2n. - M. F. Hasler, Apr 12 2015 [As far as I know, "abundancy" has only this meaning; the much less useful sigma(n) - 2n is called "abundance". - Charles R Greathouse IV, Feb 19 2017]
So far all known perfect numbers (abundancy = 2) are even, cf. A000396 = (6, 28, 496, 8128, ...). It has been conjectured but not proved that there are no odd perfect numbers. This sequence provides the list of odd numbers that approach perfection (odd numbers which abundancy is closer to two than the abundancy of any smaller odd number).
Odd numbers n such that abs(sigma(n)/n-2) < abs(sigma(m)/m-2) for all m < n. That is, each n is closer to being an odd perfect number than the preceding n. Interestingly, if abs(sigma(n)/n-2) is expressed as a reduced fraction, the numerator of the fraction is 2 for 25 out of the first 30 terms. Terms a(29) and a(30) are 127595519865 and 154063853475. - T. D. Noe, Jan 28 2010
Indices of successive minima in the sequence |A000203(n)/n - 2| for odd n. The sequence would terminate at the smallest odd perfect number (if it exists). - Max Alekseyev, Jan 26 2010
This sequence is finite if and only there is an odd perfect number. "If" is evident. "Only if" follows because for any real number r > 1 there is an odd number m relatively prime to a given integer such that 1 < sigma(m)/m < r. For example, take a large enough prime. - Charles R Greathouse IV, Dec 13 2016, corrected Feb 19 2017
Of the initial 40 terms, only term 45 is in A228058 (and also in A228059). - Antti Karttunen, Jan 04 2025

Examples

			Example: a(8) = 1155 since sigma(1155)/1155 = 1.9948 which is closer to 2 than any smaller a(n).
		

Crossrefs

Cf. A000203, A000396 (perfect numbers), A053624, A119239, A088012, A117349; A188263 and A188597 (the same but restricted to only abundant resp. deficient numbers).
Cf. also A088012, A228058, A228059.

Programs

  • Mathematica
    minDiff=Infinity; k=-1; Table[k=k+2; While[abun=DivisorSigma[1,k]/k; Abs[2-abun] > minDiff, k=k+2]; minDiff=Abs[2-abun]; k, {15}] (* T. D. Noe, Jan 28 2010 *)
  • PARI
    m=2; forstep(n=1,10^10,2, t=abs(sigma(n)/n - 2); if(tMax Alekseyev, Jan 26 2010

Extensions

Name improved by T. D. Noe, Jan 28 2010
More terms from Max Alekseyev, T. D. Noe and J. Mulder (jasper.mulder(AT)planet.nl), Jan 26 2010

A271816 Deficient-perfect numbers: Deficient numbers n such that n/(2n-sigma(n)) is an integer.

Original entry on oeis.org

1, 2, 4, 8, 10, 16, 32, 44, 64, 128, 136, 152, 184, 256, 512, 752, 884, 1024, 2048, 2144, 2272, 2528, 4096, 8192, 8384, 12224, 16384, 17176, 18632, 18904, 32768, 32896, 33664, 34688, 49024, 63248, 65536, 85936, 106928, 116624, 117808, 131072, 262144, 524288, 526688, 527872, 531968, 556544, 589312, 599072, 654848, 709784
Offset: 1

Views

Author

Keywords

Comments

Every power of 2 is part of this sequence, with 2n - sigma(n) = 1.
Any odd element of this sequence must be a perfect square with at least four distinct prime factors (Tang and Feng). The smallest odd element of this sequence is a(74) = 9018009 = 3^2 * 7^2 * 11^2 * 13^2, with 2n - sigma(n) = 819.
a(17) = 884 = 2^2 * 13 * 17 is the smallest element with three distinct prime factors.
For all n > 1 in this sequence, 5/3 <= sigma(n)/n < 2. - Charles R Greathouse IV, Apr 15 2016

Examples

			When n = 1, 2, 4, 8, 2n - sigma(n) = 1.
When n = 10, sigma(10) = 18 and so 2*10 - 18 = 2, which divides 10.
		

Crossrefs

Deficient analog of A153501. Setwise difference A097498\A153501.
Contains A000079.

Programs

  • Maple
    q:= k-> (s-> s>0 and irem(k, s)=0)(2*k-numtheory[sigma](k)):
    select(q, [$1..500000])[];  # Alois P. Heinz, Aug 26 2023
  • Mathematica
    ok[n_] := Block[{d = DivisorSigma[1, n]}, d < 2*n && Divisible[n, 2*n - d]]; Select[Range[10^5], ok] (* Giovanni Resta, Apr 14 2016 *)
  • PARI
    isok(n) = ((ab = (sigma(n)-2*n))<0) && (n % ab == 0); \\ Michel Marcus, Apr 15 2016

Formula

2^k is always an element of this sequence.
If 2^(k+1) + 2^t - 1 is an odd prime and t <= k, then n = 2^k(2^(k+1) + 2^t - 1) is deficient-perfect with 2n - sigma(n) = 2^t. In fact, these are the only terms with two distinct prime factors. (Tang et al.)

A325379 a(n) = A033879(A228058(n)).

Original entry on oeis.org

12, 52, 72, 148, 132, 216, 172, 192, 84, 292, 252, 292, 412, 476, 352, 520, 432, 640, 592, 472, 492, 672, 532, 552, 748, 412, 672, 976, 732, 576, 772, 1132, 1048, 1128, 852, 1284, 892, 952, 972, 1324, 1460, 1356, 1624, 1720, 1132, 1152, 1192, -36, 1660, 1272, 1068, 1332, 1812, 1372, 1888, 1392, 2116, 1452, 1972, 2040, 1552, 2116
Offset: 1

Views

Author

Antti Karttunen, Apr 22 2019

Keywords

Comments

The negative terms -36, -1692, -2388, -34944, -16596, -38628, -512, ..., occur at n = 48, 378, 1744, 2255, 2745, 2870, 3555, ..., where A228058(n) is 2205, 19845, 108045, 143325, 178605, 187425, 236925, ..., one of the odd abundant numbers, A005231.

Crossrefs

Programs

  • PARI
    A033879(n) = (n+n-sigma(n));
    isA228058(n) = if(!(n%2)||(omega(n)<2),0,my(f=factor(n),y=0); for(i=1,#f~,if(1==(f[i,2]%4), if((1==y)||(1!=(f[i,1]%4)),return(0),y=1), if(f[i,2]%2, return(0)))); (y));
    k=0; n=0; while(k<100,n++; if(isA228058(n), k++; print1(A033879(n), ", ")));

Formula

a(n) = A033879(A228058(n)).
a(n) = A325319(n) - A325320(n).
A001511(abs(a(n))) = A325310(A228058(n)), assuming there are no odd perfect numbers, in which case A001511(abs(a(n))) >= 3 for all n. That is, all terms are multiples of 4.

A349752 Odd numbers k for which the sigma(k) == -k (mod 3) and sigma(k) preserves the 3-adic valuation of k.

Original entry on oeis.org

7, 13, 15, 19, 31, 33, 37, 43, 61, 67, 69, 73, 79, 87, 97, 103, 105, 109, 123, 127, 139, 141, 147, 151, 153, 157, 163, 175, 177, 181, 193, 195, 199, 211, 223, 229, 231, 241, 249, 271, 277, 283, 285, 303, 307, 313, 325, 331, 337, 339, 349, 367, 373, 375, 379, 393, 397, 409, 411, 421, 429, 433, 439, 447, 457, 463
Offset: 1

Views

Author

Antti Karttunen, Nov 30 2021

Keywords

Comments

Incidentally, of the 37 known terms of A228059, all of which are multiples of three, only 15 (less than half) satisfy this condition.

Crossrefs

Programs

  • Mathematica
    Select[Range[1, 463, 2], Divisible[(s = DivisorSigma[1, #]) + #, 3] && IntegerExponent[s, 3] == IntegerExponent[#, 3] &] (* Amiram Eldar, Dec 01 2021 *)
  • PARI
    isA349752(n) = ((n%2) && (0==(sigma(n)+n)%3) && valuation(sigma(n), 3)==valuation(n, 3));

A119239 Oddly superabundant numbers: odd n with sigma(n)/n > sigma(k)/k for all odd k < n.

Original entry on oeis.org

1, 3, 9, 15, 45, 105, 315, 945, 1575, 2835, 3465, 10395, 17325, 31185, 45045, 135135, 225225, 405405, 675675, 2027025, 2297295, 3828825, 6891885, 11486475, 34459425, 43648605, 72747675, 130945815, 218243025, 654729075, 1003917915, 1527701175
Offset: 1

Views

Author

T. D. Noe, May 09 2006

Keywords

Comments

Every oddly colossally abundant number (A110464) is in this sequence.
a(8) = 945 is the first term with abundancy > 2, a(41) = 1018976683725 is the first term with abundancy > 3, and a(141) = 1853070540093840001956842537745897243375 is the first term with abundancy > 4. See A119240. - Antti Karttunen, Jul 21 2025

Crossrefs

Cf. A004394 (superabundant numbers), A005231 (odd abundant numbers), A053624 (highly composite odd numbers), A119240.
Cf. also A171929, A228059, A386423.

Programs

  • Mathematica
    rec=0; lst={}; Do[abun=DivisorSigma[1,n]/n; If[abun>rec, rec=abun; AppendTo[lst,n]], {n,1,10^6,2}]; lst
  • PARI
    r=0;forstep(n=1,1e6,2,t=sigma(n)/n;if(t>r,r=t;print1(n", "))) \\ Charles R Greathouse IV, Nov 27 2013

Extensions

Definition clarified by Jonathan Sondow, Dec 08 2011

A386422 Odd numbers k that are closer to being perfect than previous terms and also satisfy the condition that A324644(k)/A324198(k) = 2.

Original entry on oeis.org

3, 33, 99, 135, 855, 2295, 19575, 38745, 63855, 121485, 371925, 3870195, 8109585, 28306005, 36340395, 113215095, 463084245, 672363615, 675916395, 686574735, 1208140395
Offset: 1

Views

Author

Antti Karttunen, Jul 21 2025

Keywords

Comments

Questions: Are there only multiples of 5 after the three initial terms? Are there any common terms with A228058?

Crossrefs

Apart from initial 3, a subsequence of A364286.
Cf. also A171929, A228059, A386419, A386420, A386421 for similar sequences.

Programs

  • PARI
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    is_A364286(n) = if(isprime(n), 0, my(u=A276086(n)); (gcd(sigma(n),u)==2*gcd(n,u))); \\ Antti Karttunen, Jul 21 2025
    m=-1; n=-1; k=0; while(m!=0, n+=2; if(!((n-1)%(2^25)),print1("("n")")); if(isprime(n) || is_A364286(n), if((m<0) || abs((sigma(n)/n)-2)
    				

A386419 Odd numbers k that are closer to being perfect than previous terms, and also satisfy the condition that phi(k) = phi(sigma(k)).

Original entry on oeis.org

1, 3, 15, 45, 585, 2295, 11475, 29835, 72675, 424575, 7977165, 28851975, 29277885, 39317175
Offset: 1

Views

Author

Antti Karttunen, Jul 21 2025

Keywords

Comments

Questions: Is 45 the only term also in A228058? (See also A354362). Are there only multiples of 5 after the two initial terms?
If it exists, a(15) > 2^30 (1073741824).

Crossrefs

Programs

  • PARI
    A353680(n) = ((n%2) && (eulerphi(sigma(n))==eulerphi(n)));
    isA353679(n) = A353680(n);
    m=-1; n=0; k=0; while(m!=0, n++; if(!(n%(2^25)),print1("("n")")); if(isA353679(n), if((m<0) || abs((sigma(n)/n)-2)
    				
Showing 1-10 of 13 results. Next