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.

User: Leo Hennig

Leo Hennig's wiki page.

Leo Hennig has authored 6 sequences.

A382930 a(n) is the smallest k such that A382506(k) + sigma(k) = A000396(n).

Original entry on oeis.org

1, 4, 16, 180, 2520, 7207200
Offset: 1

Author

Leo Hennig, Apr 09 2025

Keywords

Comments

Numbers k for which A382506 "jumps", there appears to be a remarkable relationship to A002182, the highly composites, in line with jumps for A382483 being in that series. See also the graph for A382506.

Examples

			A382506(16) = 465, 465 + sigma(16) = 496, which is perfect.
		

Crossrefs

Extensions

New name and a(1) from Jinyuan Wang, Apr 10 2025
a(6) from David A. Corneth, Apr 10 2025

A382929 Smallest number k such that k + n + sigma(n) is a perfect number.

Original entry on oeis.org

4, 1, 21, 17, 17, 10, 13, 5, 6, 0, 5, 456, 1, 458, 457, 449, 461, 439, 457, 434, 443, 438, 449, 412, 440, 428, 429, 412, 437, 394, 433, 401, 415, 408, 413, 369, 421, 398, 401, 366, 413, 358, 409, 368, 373, 378, 401, 324, 390, 353, 373, 346, 389, 322, 369, 320, 359, 348, 377, 268
Offset: 1

Author

Leo Hennig, Apr 09 2025

Keywords

Examples

			a(10) = 0, because 10 + sigma(10) = 28, which is perfect.
a(12) = 456, because 456 + 12 + sigma(12) = 496, which is perfect.
As 496 is the smallest perfect number at least as large as sigma(60) + 60 = 168 + 60 = 228 we have a(60) = 496 - 228 = 268. - _David A. Corneth_, Apr 10 2025
		

Crossrefs

Programs

  • Mathematica
    Do[k=0;s=DivisorSigma[1,n];While[DivisorSigma[1,s+n+k]!=2*(s+n+k),k++];a[n]=k,{n,60}];Array[a,60] (* James C. McMahon, Apr 10 2025 *)
  • PARI
    a(n) = my(k=0); while (sigma(k+n+sigma(n)) != 2*(k+n+sigma(n)), k++); k; \\ Michel Marcus, Apr 09 2025
    
  • PARI
    a(n) = {my(s = sigma(n) + n);
        forprime(p = 2, oo,
            my(c = 2^p-1);
            if(isprime(c) && binomial(c+1, 2) >= s,
                return(binomial(c+1, 2) - s)))
    } \\ David A. Corneth, Apr 10 2025
    
  • PARI
    a(n) = my(v = [6, 28, 496, 8128, 33550336, 8589869056], x=n+sigma(n), k=0); for (i=1, #v-1, if ((x > v[i]) && (x <= v[i+1]), k = i; break)); v[k+1] - x; \\ Michel Marcus, Apr 11 2025

A382506 a(n) is the smallest k such that sigma(n) + k is a perfect number.

Original entry on oeis.org

5, 3, 2, 21, 0, 16, 20, 13, 15, 10, 16, 0, 14, 4, 4, 465, 10, 457, 8, 454, 464, 460, 4, 436, 465, 454, 456, 440, 466, 424, 464, 433, 448, 442, 448, 405, 458, 436, 440, 406, 454, 400, 452, 412, 418, 424, 448, 372, 439, 403, 424, 398, 442, 376, 424, 376, 416, 406, 436, 328, 434, 400
Offset: 1

Author

Leo Hennig, Mar 29 2025

Keywords

Examples

			sigma(1) = 1, 1 + 5 = 6, k = 5.
sigma(6) = 12, 12 + 16 = 28, k = 16.
sigma(180) = 546, 546 + 7582 = 8128, k = 7582.
As sigma(3000) = 9360 and the smallest perfect number at least as large as 9360 is 2^12 * (2^13 - 1) = 33550336 we have a(3000) = 33550336 - sigma(3000) = 33540976. - _David A. Corneth_, Apr 10 2025
		

Crossrefs

Programs

  • Mathematica
    Do[k=0;s=DivisorSigma[1,n];While[DivisorSigma[1,s+k]!=2*(s+k),k++];a[n]=k,{n,62}];Array[a,62] (* James C. McMahon, Apr 10 2025 *)
  • PARI
    a(n) = my(s=sigma(n),k=0); while (sigma(s+k) != 2*(s+k), k++); k; \\ Michel Marcus, Mar 30 2025
    
  • PARI
    a(n) = {my(s = sigma(n));
        forprime(p = 2, oo,
            my(c = 2^p-1);
            if(isprime(c) && binomial(c+1, 2) >= s,
               return(binomial(c+1, 2) - s)))
    } \\ David A. Corneth, Apr 10 2025

Formula

a(A081357(n)) = 0 and a(A146542(n)) = 0.

A382504 Numbers k such that one or both of sigma(k) + k and sigma(k) - k is a perfect number.

Original entry on oeis.org

6, 10, 25, 28, 496, 652, 8128, 10682, 10828, 33550336, 44655764, 8589869056, 8623554304
Offset: 1

Author

Leo Hennig, Mar 29 2025

Keywords

Comments

10 and 838476969534191044 are the only known numbers k for which sigma(k) + k is a perfect number.

Examples

			sigma(6) = 12 and 12 - 6 = 6.
sigma(10) = 18 and 18 + 10 = 28.
sigma(25) = 31 and 31 - 25 = 6.
		

Crossrefs

Supersequence of A000396 and of A237286.
Cf. A000203.

Programs

  • PARI
    isp(x) = if (x>0, sigma(x) == 2*x);
    isok(x) = isp(sigma(x)-x) || isp(sigma(x)+x); \\ Michel Marcus, Mar 29 2025

A382483 a(n) = smallest number k such that at least one of sigma(n) - k and sigma(n) + k is a perfect number.

Original entry on oeis.org

5, 3, 2, 1, 0, 6, 2, 9, 7, 10, 6, 0, 8, 4, 4, 3, 10, 11, 8, 14, 4, 8, 4, 32, 3, 14, 12, 28, 2, 44, 4, 35, 20, 26, 20, 63, 10, 32, 28, 62, 14, 68, 16, 56, 50, 44, 20, 96, 29, 65, 44, 70, 26, 92, 44, 92, 52, 62, 32, 140, 34, 68, 76, 99, 56, 116, 40, 98, 68, 116, 44, 167, 46, 86, 96, 112, 68, 140
Offset: 1

Author

Leo Hennig, Mar 27 2025

Keywords

Examples

			sigma(6) = 12, the nearest perfect number is 6, thus a(6) = 12 - 6 = 6.
sigma(26) = 42, the nearest perfect number is 28, thus a(26) = 42 - 28 = 14.
		

Crossrefs

Programs

  • Maple
    isA000396 := proc(n::integer)
        if n < 6 then
            false ;
        elif numtheory[sigma](n) = 2*n then
            true;
        else
            false;
        end if;
    end proc:
    A382483 := proc(n)
        local k ;
        for k from 0 do
            if isA000396(numtheory[sigma](n)-k) or isA000396(numtheory[sigma](n)+k)  then
                return k;
            end if;
        end do:
    end proc:
    seq(A382483(n),n=1..50) ; # R. J. Mathar, Apr 01 2025
  • PARI
    isp(x) = if (x>0, sigma(x) == 2*x);
    a(n) = my(k=0, s=sigma(n)); while (!(isp(s-k) || isp(s+k)), k++); k; \\ Michel Marcus, Apr 01 2025

Formula

a(A081357(k)) = 0.
a(A146542(k)) = 0.
a(A000396(k)) = A000396(k).

A381321 Numbers k such that sigma(k)/k - 1 equals (sigma(m)/m - 1)^2 for some m <= k.

Original entry on oeis.org

1, 6, 28, 216, 360, 496, 2016, 8128, 16758, 1571328, 1935360, 2678400, 33550336, 54758400, 101382400, 1685013120
Offset: 1

Author

Leo Hennig, Feb 21 2025

Keywords

Comments

For any perfect number sigma(k)/k - 1 = 1, so all perfect numbers are terms.
2016 = 2^(6-1)*(2^6-1) is of the form 2^(k-1)*(2^k - 1) like the perfect numbers.
4428914688 from A383482 and 155086041146982400 from A218404 are terms. - Michel Marcus, May 22 2025

Examples

			216 is a term since sigma(216)/216 - 1 = (4/3)^2 and sigma(12)/12 - 1 = 4/3.
		

Crossrefs

Subsequence of A383482.

Programs

  • PARI
    isok(k)=my(t=(sigma(k)-k)*k); if(issquare(t), my(r=sqrtint(t)/k+1, s=denominator(r)); forstep(m=s, k, s, if(sigma(m)/m==r, return(1)) )); 0 \\ Andrew Howroyd, Mar 03 2025

Extensions

a(15)-a(16) from Michel Marcus, Mar 05 2025