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.

Previous Showing 21-30 of 185 results. Next

A074918 Highly imperfect numbers: n sets a record for the value of abs(sigma(n)-2*n) (absolute value of A033879).

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 120, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 180, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 240, 269, 271, 277, 281, 283, 293, 307
Offset: 1

Views

Author

Joseph L. Pe, Oct 01 2002

Keywords

Comments

A perfect number n is defined by sigma(n) = 2n, so the value of i(n) = |sigma(n)-2n| measures the degree of perfection of n. The larger i(n) is, the more "imperfect" n is. I call the numbers n such that i(k) < i(n) for all k < n "highly-imperfect numbers".
RECORDS transform of |A033879|.
Initial terms are odd primes but then even numbers appear.
The last odd term is a(79) = 719. (Proof: sigma(27720n) >= 11080n, and so sigma(27720n) >= 4 * 27720(n + 1) for n >= 8, so there is no odd member of this sequence between 27720 * 8 and 27720 * 9, between 27720 * 9 and 2770 * 10, etc.; the remaining terms are checked by computer.) [Charles R Greathouse IV, Apr 12 2010]

Crossrefs

Programs

  • Mathematica
    r = 0; l = {}; Do[ n = Abs[2 i - DivisorSigma[1, i]]; If[n > r, r = n; l = Append[l, i]], {i, 1, 10^4}]; l
    DeleteDuplicates[Table[{n,Abs[DivisorSigma[1,n]-2n]},{n,350}],GreaterEqual[ #1[[2]],#2[[2]]]&][[All,1]] (* Harvey P. Dale, Jan 16 2023 *)

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

A295881 Reversing binary representation of the deficiency of n, A033879(n).

Original entry on oeis.org

1, 1, 2, 1, 4, 0, 14, 1, 13, 2, 26, 12, 28, 4, 14, 1, 16, 5, 50, 6, 26, 8, 62, 20, 55, 26, 22, 0, 44, 20, 38, 1, 50, 22, 62, 53, 100, 16, 62, 30, 104, 20, 122, 4, 28, 52, 118, 36, 121, 11, 38, 14, 84, 20, 110, 24, 98, 42, 74, 80, 76, 44, 62, 1, 118, 20, 194, 26, 122, 12, 206, 85, 200, 98, 42, 28, 74, 20, 214, 46, 121
Offset: 1

Views

Author

Antti Karttunen, Dec 04 2017

Keywords

Comments

For all n, A010060(a(A005100(n))) = 1 and A010060(a(A023196(n))) = 0. That is, for the deficient numbers a(n) is an odious number (A000069) and for the nondeficient numbers a(n) is an evil number (A001969).

Crossrefs

Cf. A000396 (gives the positions of zeros).

Programs

Formula

If A033879(n) <= 0, a(n) = A048724(-A033879(n)), otherwise a(n) = A065621(A033879(n)).
For all n >= 1, A065620(a(n)) = A033879(n).

A318441 a(n) = Sum_{d|n} [moebius(n/d) > 0]*A033879(d).

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 6, 1, 5, 3, 10, -3, 12, 5, 7, 1, 16, -1, 18, -1, 11, 9, 22, -11, 19, 11, 14, 1, 28, -5, 30, 1, 19, 15, 23, -19, 36, 17, 23, -9, 40, -3, 42, 5, 14, 21, 46, -27, 41, 11, 31, 7, 52, -7, 39, -7, 35, 27, 58, -45, 60, 29, 24, 1, 47, 1, 66, 11, 43, 7, 70, -55, 72, 35, 30, 13, 59, 3, 78, -25, 41, 39, 82, -51, 63, 41, 55, -3, 88
Offset: 1

Views

Author

Antti Karttunen, Aug 26 2018

Keywords

Crossrefs

Programs

  • PARI
    A318441(n) = sumdiv(n,d,(1==moebius(n/d))*(d+d-sigma(d)));

Formula

a(n) = Sum_{d|n} [A008683(n/d) == 1]*A033879(d).
a(n) = A291784(n) - A318325(n).
A083254(n) = a(n) - A318442(n).

A324530 Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = [A033879(n), A318458(n)] for all other numbers, except f(1) = -1.

Original entry on oeis.org

1, 2, 3, 2, 4, 5, 6, 2, 7, 8, 9, 10, 11, 12, 13, 2, 14, 15, 16, 17, 9, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 2, 16, 28, 19, 29, 30, 31, 19, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 2, 39, 56, 57, 58, 35, 59, 60, 61, 62, 63, 64, 65, 51, 66, 67, 68, 41, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 51, 80
Offset: 1

Views

Author

Antti Karttunen, Mar 05 2019

Keywords

Crossrefs

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A033879(n) = (n+n-sigma(n));
    A318458(n) = bitand(n,sigma(n)-n);
    Aux324530(n) = if(1==n,-1,[A033879(n), A318458(n)]);
    v324530 = rgs_transform(vector(up_to,n,Aux324530(n)));
    A324530(n) = v324530[n];

Formula

a(2^n) = 2 for all n >= 1.

A325976 a(n) is the largest k <= n such that k and (2n-sigma(n)) [= A033879(n)] are relatively prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 1, 7, 8, 9, 9, 11, 11, 13, 13, 13, 16, 17, 17, 19, 19, 21, 21, 23, 23, 25, 23, 27, 1, 29, 29, 31, 32, 31, 33, 35, 36, 37, 37, 39, 39, 41, 41, 43, 43, 43, 43, 47, 47, 49, 50, 49, 49, 53, 53, 55, 55, 57, 57, 59, 59, 61, 61, 63, 64, 65, 65, 67, 67, 67, 69, 71, 71, 73, 73, 75, 73, 77, 77, 79, 79, 81, 81, 83, 83, 85, 83
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2019

Keywords

Crossrefs

Programs

  • PARI
    A325976(n) = { my(s=sigma(n)); forstep(k=n, 0, -1, if(1==gcd((n+n-s), k), return(k))); };
    
  • PARI
    A325817(n) = { my(s=sigma(n)); for(i=0, s, if(1==gcd(n-i, n-(s-i)), return(i))); };
    A325976(n) = (n - A325817(n));

Formula

a(n) = n - A325817(n) = A033879(n) + A325826(n).
a(n) >= A325959(n).
gcd(a(n), A325826(n)) = 1.

A331734 a(n) = A033879(A225546(n)).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 0, 5, 1, 1, -4, 1, 1, 1, 4, 1, -3, 1, -28, 1, 1, 1, -12, 41, 1, -19, -508, 1, 1, 1, 2, 1, 1, 1, 14, 1, 1, 1, -60, 1, 1, 1, -131068, -115, 1, 1, -2, 3281, -39, 1, -8589934588, 1, -51, 1, -1020, 1, 1, 1, -124, 1, 1, -2035, 6, 1, 1, 1, -36893488147419103228, 1, 1, 1, -12, 1, 1, -199, -680564733841876926926749214863536422908
Offset: 1

Views

Author

Antti Karttunen, Feb 02 2020

Keywords

Crossrefs

Cf. A323244, A323174, A324055, A324185, A324546 for other permutations of the deficiency, and also A324574, A324654.

Programs

  • PARI
    A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; };
    A331734(n) = if(issquarefree(n),1,my(f=factor(n),u=#binary(vecmax(f[, 2])),prods=vector(u,x,1),m=1,e); for(i=1,u,for(k=1,#f~, if(bitand(f[k,2],m),prods[i] *= f[k,1])); m<<=1); (2*prod(i=1,u,prime(i)^A048675(prods[i]))) - prod(i=1,u,(prime(i)^(1+A048675(prods[i]))-1)/(prime(i)-1)));

Formula

a(n) = A033879(A225546(n)) = 2*A225546(n) - A331733(n).
For all n, a(A005117(n)) = 1. [It is not known if there are 1's in any other positions. See Jianing Song's Oct 13 2019 comment in A033879.]
For a necessary condition that a(s) would be zero for any square, see A331741.

A330901 Numbers k such that k and k+2 have the same deficiency (A033879).

Original entry on oeis.org

2, 6497, 12317, 91610, 133787, 181427, 404471, 439097, 485237, 1410119, 2696807, 6220607, 6827369, 6954767, 9770027, 10302419, 10449347, 10887977, 11014007, 16745387, 18959111, 25883519, 27334469, 39508037, 40311149, 40551617, 42561437, 44592209, 47717471, 48912107
Offset: 1

Views

Author

Amiram Eldar, May 01 2020

Keywords

Comments

Are 2 and 91610 the only even terms?
Are there any abundant numbers (A005101) in this sequence?
Numbers k such that k and k+1 have the same deficiency are 1, 145215, and no more below 10^13 (they are a subset of A112645).
Up to a(2214) = 2001876242879 there are no further even terms nor abundant terms. - Giovanni Resta, May 01 2020

Examples

			2 is a term since 2 and 4 have the same deficiency: A033879(2) = 2*2 - sigma(2) = 4 - 3 = 1, and A033879(4) = 2*4 - sigma(4) = 8 - 7 = 1.
		

Crossrefs

Programs

  • Mathematica
    def[n_] := 2*n - DivisorSigma[1, n]; Select[Range[10^5], def[#] == def[# + 2] &]
    SequencePosition[Table[2n-DivisorSigma[1,n],{n,48920000}],{x_,,x}][[;;,1]] (* Harvey P. Dale, Apr 26 2025 *)
  • PARI
    j1=1;j2=1;for(k=3,50000000,j=k+k-sigma(k);if(j==j1,print1(k-2,", "));j1=j2;j2=j) \\ Hugo Pfoertner, May 01 2020

A331181 Number of values of k, 1 <= k <= n, with A033879(k) = A033879(n), where A033879(n) is the deficiency of n, 2n-sigma(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 11 2020

Keywords

Comments

Ordinal transform of A033879, or equally, of A033880, or of A286449.

Crossrefs

Programs

  • Mathematica
    b[_] = 0;
    a[n_] := With[{t = 2 n - DivisorSigma[1, n]}, b[t] = b[t] + 1];
    Array[a, 105] (* Jean-François Alcover, Jan 10 2022 *)
  • PARI
    up_to = 65537;
    ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
    A033879(n) = (2*n-sigma(n));
    v331181 = ordinal_transform(vector(up_to,n,A033879(n)));
    A331181(n) = v331181[n];

A335254 Numbers k such that the abundance (A033880) of k is equal to the deficiency (A033879) of k+1.

Original entry on oeis.org

672, 523776, 19327369215
Offset: 1

Views

Author

Amiram Eldar, May 28 2020

Keywords

Comments

Equivalently, k and k+1 have the same absolute value of abundance (or deficiency) with opposite signs.
Equivalently, s(k) + s(k+1) = k + (k+1), where s(k) is the sum of proper divisors of k (A001065).
If k is a 3-perfect number (A005820) and k+1 is a prime, then k is in the sequence. Of the 6 known 3-perfect numbers only 672 and 523776 have this property.
a(4) > 10^11, if it exists.
a(4) > 10^13, if it exists. - Giovanni Resta, May 30 2020

Examples

			672 is a term since A033880(672) = sigma(672) - 2*672 = 2016 - 1344 = 672, and A033879(673) = 2*673 - sigma(673) = 1346 - 674 = 672.
		

Crossrefs

Programs

  • Mathematica
    ab[n_] := DivisorSigma[1, n] - 2*n; Select[Range[6 * 10^5], ab[#] == -ab[# + 1] &]
Previous Showing 21-30 of 185 results. Next