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-9 of 9 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

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

A228059 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 that are closer to being perfect than previous terms.

Original entry on oeis.org

45, 405, 2205, 26325, 236925, 1380825, 1660725, 35698725, 3138290325, 29891138805, 73846750725, 194401220013, 194509436121, 194581580193, 194689796301, 194798012409, 194906228517, 194942300553, 195230876841, 195339092949, 195447309057, 195699813309
Offset: 1

Views

Author

T. D. Noe, Aug 14 2013

Keywords

Comments

A number x is perfect if sigma(x) = 2x, where sigma is the sum of divisors of x. See A228058 for numbers of the form p^(1+4k) * r^2. This sequence ends when the first odd perfect number occurs.
The first two papers by Dris listed below are for information only; this sequence in independent of the papers. In the second paper, Dris attempts to prove that the exponent of p above is 1 for odd perfect numbers. Coincidently, the first 9 numbers in this sequence have exponent 1.
a(38) > 10^12. - Giovanni Resta, Aug 16 2018
a(38) <= 283665529390725 = 15349 * (3^3 * 5 * 19 * 53)^2. - Giovanni Resta, Aug 23 2018
a(39) <= 3116918388785625 = 37993 * (3^2 * 5^2 * 19 * 67)^2. - Alexander Violette, Mar 05 2022
The first 37 terms are all multiples of 3, as well as the two additional terms given above. See also comments in A349752. - Antti Karttunen, Jan 04 2025

Examples

			           45 =   5 * 3^2.
          405 =   5 * 3^4.
         2205 =   5 * (3 * 7)^2.
        26325 =  13 * (3^2 * 5)^2.
       236925 =  13 * (3^3 * 5)^2.
      1380825 =  17 * (3 * 5 * 19)^2.
      1660725 =  61 * (3 * 5 * 11)^2.
     35698725 =  61 * (3^2 * 5 * 17)^2.
   3138290325 =  53 * (3^4 * 5 * 19)^2.
  29891138805 =   5 * (3^2 * 11^2 * 71)^2.
  73846750725 = 509 * (3 * 5 * 11 * 73)^2.
		

Crossrefs

Cf. A000203 (sigma), A000396 (perfect numbers), A228058, A325379, A349752.
Cf. also A171929.

Programs

  • Mathematica
    nn = 7; f[n_] := Abs[DivisorSigma[1, n]/n - 2]; n = 45; t = {n}; lastF = f[n]; cnt = 1; While[cnt < 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 && f[n] < lastF, cnt++; lastF = f[n]; Print[{n, lastF}]; AppendTo[t, n]]]; t
  • PARI
    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));
    m=-1; n=0; while(m!=0, n++; if(isA228058(n), if((m<0) || abs((sigma(n)/n)-2)Antti Karttunen, Apr 22 2019

Extensions

a(10) (as communicated by T. D. Noe) added by Jose Arnaldo Bebita Dris, Aug 16 2018
a(11)-a(22) from Giovanni Resta, Aug 16 2018

A325320 Sum of proper divisors of A228058(n) that are not squarefree; a(n) = -A325314(A228058(n)).

Original entry on oeis.org

9, 9, 9, 49, 9, 25, 9, 9, 297, 25, 9, 9, 121, 49, 9, 25, 9, 49, 169, 9, 9, 25, 9, 9, 25, 585, 9, 25, 9, 729, 9, 49, 289, 25, 9, 121, 9, 9, 9, 361, 49, 25, 49, 121, 9, 9, 9, 2049, 25, 9, 1161, 9, 25, 9, 25, 9, 49, 9, 529, 25, 9, 25, 9, 169, 2381, 49, 1449, 9, 9, 9, 1593, 9, 25, 9, 121, 9, 49, 9, 2889, 9, 25, 289, 9, 2997, 9
Offset: 1

Views

Author

Antti Karttunen, Apr 22 2019

Keywords

Comments

All terms are of the form 4k+1, A016813.
If a(n) is never equal to A325319(n), then there are no odd perfect numbers.

Crossrefs

Programs

  • PARI
    A162296(n) = sumdiv(n, d, d*(1-issquarefree(d)));
    A325314(n) = (n - A162296(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(-A325314(n), ", ")));

Formula

a(n) = -A325314(A228058(n)) = A162296(A228058(n)) - A228058(n).
a(n) = A325319(n) - A325379(n) = A325378(n) - A325319(n).
a(n) < A001065(A228058(n)) for all n.

A325319 a(n) = -A325313(A228058(n)).

Original entry on oeis.org

21, 61, 81, 197, 141, 241, 181, 201, 381, 317, 261, 301, 533, 525, 361, 545, 441, 689, 761, 481, 501, 697, 541, 561, 773, 997, 681, 1001, 741, 1305, 781, 1181, 1337, 1153, 861, 1405, 901, 961, 981, 1685, 1509, 1381, 1673, 1841, 1141, 1161, 1201, 2013, 1685, 1281, 2229, 1341, 1837, 1381, 1913, 1401, 2165, 1461, 2501, 2065, 1561, 2141
Offset: 1

Views

Author

Antti Karttunen, Apr 22 2019

Keywords

Comments

All terms are of the form 4k+1, A016813.
If a(n) is never equal to A325320(n), then there are no odd perfect numbers.

Crossrefs

Programs

  • PARI
    A048250(n) = factorback(apply(p -> p+1,factor(n)[,1]));
    A325313(n) = (A048250(n) - 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(-A325313(n), ", ")));

Formula

a(n) = -A325313(A228058(n)) = A228058(n) - A048250(A228058(n)).
a(n) = A325320(n) + A325379(n) = A325378(n) - A325320(n).

A325378 a(n) = A162296(A228058(n)) - A048250(A228058(n)).

Original entry on oeis.org

30, 70, 90, 246, 150, 266, 190, 210, 678, 342, 270, 310, 654, 574, 370, 570, 450, 738, 930, 490, 510, 722, 550, 570, 798, 1582, 690, 1026, 750, 2034, 790, 1230, 1626, 1178, 870, 1526, 910, 970, 990, 2046, 1558, 1406, 1722, 1962, 1150, 1170, 1210, 4062, 1710, 1290, 3390, 1350, 1862, 1390, 1938, 1410, 2214, 1470, 3030
Offset: 1

Views

Author

Antti Karttunen, Apr 22 2019

Keywords

Crossrefs

Programs

  • PARI
    A048250(n) = factorback(apply(p -> p+1,factor(n)[,1]));
    A162296(n) = sumdiv(n, d, d*(1-issquarefree(d)));
    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(A162296(n) - A048250(n),", ")));

Formula

a(n) = A162296(A228058(n)) - A048250(A228058(n)).
a(n) = A325319(n) + A325320(n).

A325824 a(n) = A325814(A228058(n)).

Original entry on oeis.org

27, 75, 99, 203, 171, 255, 219, 243, 171, 335, 315, 363, 539, 539, 435, 575, 531, 707, 767, 579, 603, 735, 651, 675, 815, 507, 819, 1055, 891, 675, 939, 1211, 1343, 1215, 1035, 1419, 1083, 1155, 1179, 1691, 1547, 1455, 1715, 1859, 1371, 1395, 1443, 759, 1775, 1539, 1179, 1611, 1935, 1659, 2015, 1683, 2219, 1755, 2507, 2175, 1875, 2255
Offset: 1

Views

Author

Antti Karttunen, May 23 2019

Keywords

Comments

First negative term occurs as a(16307) = -210973, with A228058(16307) = 1289925. The next negative terms occurs as a(20807) = -242901, with A228058(20807) = 1686825.

Crossrefs

Programs

  • PARI
    up_to = 10000;
    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, May 23 2019
    A034448(n) = { my(f=factorint(n)); prod(k=1, #f~, 1+(f[k, 1]^f[k, 2])); }; \\ After code in A034448
    A048146(n) = (sigma(n)-A034448(n));
    A325814(n) = (n-A048146(n));
    A325824(n) = A325814(A228058(n));

Formula

a(n) = A325814(A228058(n)).
a(n) = A325379(n) + A325823(n).

A325823 Sum of unitary proper divisors of A228058(n): a(n) = A034460(A228058(n)).

Original entry on oeis.org

15, 23, 27, 55, 39, 39, 47, 51, 87, 43, 63, 71, 127, 63, 83, 55, 99, 67, 175, 107, 111, 63, 119, 123, 67, 95, 147, 79, 159, 99, 167, 79, 295, 87, 183, 135, 191, 203, 207, 367, 87, 99, 91, 139, 239, 243, 251, 795, 115, 267, 111, 279, 123, 287, 127, 291, 103, 303, 535, 135, 323, 139, 327, 187, 715, 111, 119, 347, 359, 363, 123, 383
Offset: 1

Views

Author

Antti Karttunen, May 23 2019

Keywords

Crossrefs

Programs

  • PARI
    up_to = 10000;
    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, May 23 2019
    A034448(n) = { my(f=factorint(n)); prod(k=1, #f~, 1+(f[k, 1]^f[k, 2])); }; \\ After code in A034448
    A034460(n) = (A034448(n) - n);
    A325823(n) = A034460(A228058(n));

Formula

a(n) = A034460(A228058(n)).
a(n) = A325824(n) - A325379(n).

A325310 a(n) = A001511(A325315(n)), except when A325315(n) = 0, then a(n) = 0.

Original entry on oeis.org

1, 1, 2, 1, 3, 0, 2, 1, 1, 2, 2, 3, 3, 3, 2, 1, 5, 1, 2, 2, 2, 4, 2, 3, 1, 2, 2, 0, 3, 3, 2, 1, 2, 2, 2, 1, 3, 5, 2, 2, 4, 3, 2, 3, 3, 3, 2, 3, 1, 1, 2, 2, 3, 3, 2, 4, 2, 2, 2, 4, 3, 3, 2, 1, 2, 3, 2, 2, 2, 3, 2, 1, 4, 2, 2, 3, 2, 3, 2, 2, 1, 2, 2, 6, 2, 4, 2, 3, 4, 2, 2, 5, 2, 3, 2, 3, 6, 1, 2, 1, 3, 3, 2, 2, 2
Offset: 1

Views

Author

Antti Karttunen, Apr 21 2019

Keywords

Crossrefs

Cf. A000396, A001511, A028982 (gives the positions of 1's), A048250, A162296, A228058, A325313, A325314, A325315, A325378, A325379.

Programs

  • Mathematica
    Array[If[# == 0, 0, IntegerExponent[2 #, 2]] &[BitXor @@ Abs[#1 - Map[Total, {#3, Complement[#2, #3]}]]] & @@ {#1, #2, Select[#2, SquareFreeQ]} & @@ {#, Divisors[#]} &, 105] (* Michael De Vlieger, Apr 21 2019 *)
  • PARI
    A001511ext(n) = if(!n,n,sign(n)*(1+valuation(n,2))); \\ Like A001511 but gives 0 for 0 and -A001511(-n) for negative numbers.
    A048250(n) = factorback(apply(p -> p+1,factor(n)[,1]));
    A325313(n) = (A048250(n) - n);
    A162296(n) = sumdiv(n, d, d*(1-issquarefree(d)));
    A325314(n) = (n - A162296(n));
    A325315(n) = bitxor(abs(A325313(n)),abs(A325314(n)));
    A325310(n) = A001511ext(A325315(n));

Formula

If A325315(n) = 0, then a(n) = 0, otherwise a(n) = A001511(A325315(n)).
a(A228058(n)) = A001511(abs(A325379(n))), assuming there are no odd perfect numbers, in which case a(A228058(n)) >= 3 for all n.
Showing 1-9 of 9 results.