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.

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

Views

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.

A354072 Perfect numbers that are the sum of the divisors of some number.

Original entry on oeis.org

6, 28, 496, 33550336, 8589869056, 137438691328, 2305843008139952128, 2658455991569831744654692615953842176, 191561942608236107294793378084303638130997321548169216, 13164036458569648337239753460458722910223472318386943117783728128
Offset: 1

Views

Author

Jaroslav Krizek, May 16 2022

Keywords

Comments

The distinct values of A000203(A146542(n)).
Conjecture: 8128 is the only perfect number that is not in this sequence.

Examples

			The perfect number 28 is in the sequence because 28 = sigma(12).
sigma(727145809044307968) = sigma(1152771972099211264) = 2305843008139952128.
		

Crossrefs

Intersection of A000396 and A002191.

Programs

  • Magma
    Set(Sort([&+Divisors(m): m in [1..10^7] | &+Divisors(&+Divisors(m)) eq 2 * &+Divisors(m)]))

Extensions

a(8)-a(10) from Amiram Eldar, May 12 2024

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