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-3 of 3 results.

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

Views

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

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

Views

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

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

Views

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
Showing 1-3 of 3 results.