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-10 of 14 results. Next

A000396 Perfect numbers k: k is equal to the sum of the proper divisors of k.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

A number k is abundant if sigma(k) > 2k (cf. A005101), perfect if sigma(k) = 2k (this sequence), or deficient if sigma(k) < 2k (cf. A005100), where sigma(k) is the sum of the divisors of k (A000203).
The numbers 2^(p-1)*(2^p - 1) are perfect, where p is a prime such that 2^p - 1 is also prime (for the list of p's see A000043). There are no other even perfect numbers and it is believed that there are no odd perfect numbers.
Numbers k such that Sum_{d|k} 1/d = 2. - Benoit Cloitre, Apr 07 2002
For number of divisors of a(n) see A061645(n). Number of digits in a(n) is A061193(n). - Lekraj Beedassy, Jun 04 2004
All terms other than the first have digital root 1 (since 4^2 == 4 (mod 6), we have, by induction, 4^k == 4 (mod 6), or 2*2^(2*k) = 8 == 2 (mod 6), implying that Mersenne primes M = 2^p - 1, for odd p, are of the form 6*t+1). Thus perfect numbers N, being M-th triangular, have the form (6*t+1)*(3*t+1), whence the property N mod 9 = 1 for all N after the first. - Lekraj Beedassy, Aug 21 2004
The earliest recorded mention of this sequence is in Euclid's Elements, IX 36, about 300 BC. - Artur Jasinski, Jan 25 2006
Theorem (Euclid, Euler). An even number m is a perfect number if and only if m = 2^(k-1)*(2^k-1), where 2^k-1 is prime. Euler's idea came from Euclid's Proposition 36 of Book IX (see Weil). It follows that every even perfect number is also a triangular number. - Mohammad K. Azarian, Apr 16 2008
Triangular numbers (also generalized hexagonal numbers) A000217 whose indices are Mersenne primes A000668, assuming there are no odd perfect numbers. - Omar E. Pol, May 09 2008, Sep 15 2013
If a(n) is even, then 2*a(n) is in A181595. - Vladimir Shevelev, Nov 07 2010
Except for a(1) = 6, all even terms are of the form 30*k - 2 or 45*k + 1. - Arkadiusz Wesolowski, Mar 11 2012
a(4) = A229381(1) = 8128 is the "Simpsons's perfect number". - Jonathan Sondow, Jan 02 2015
Theorem (Farideh Firoozbakht): If m is an integer and both p and p^k-m-1 are prime numbers then x = p^(k-1)*(p^k-m-1) is a solution to the equation sigma(x) = (p*x+m)/(p-1). For example, if we take m=0 and p=2 we get Euclid's result about perfect numbers. - Farideh Firoozbakht, Mar 01 2015
The cototient of the even perfect numbers is a square; in particular, if 2^p - 1 is a Mersenne prime, cototient(2^(p-1) * (2^p - 1)) = (2^(p-1))^2 (see A152921). So, this sequence is a subsequence of A063752. - Bernard Schott, Jan 11 2019
Euler's (1747) proof that all the even perfect number are of the form 2^(p-1)*(2^p-1) implies that their asymptotic density is 0. Kanold (1954) proved that the asymptotic density of odd perfect numbers is 0. - Amiram Eldar, Feb 13 2021
If k is perfect and semiprime, then k = 6. - Alexandra Hercilia Pereira Silva, Aug 30 2021
This sequence lists the fixed points of A001065. - Alois P. Heinz, Mar 10 2024

Examples

			6 is perfect because 6 = 1+2+3, the sum of all divisors of 6 less than 6; 28 is perfect because 28 = 1+2+4+7+14.
		

References

  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 4.
  • Albert H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 2d ed. 1966, pp. 11-23.
  • Stanley J. Bezuszka, Perfect Numbers (Booklet 3, Motivated Math. Project Activities), Boston College Press, Chestnut Hill MA, 1980.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 136-137.
  • Euclid, Elements, Book IX, Section 36, about 300 BC.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §3.3 Perfect and Amicable Numbers, pp. 82-83.
  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section B1.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 239.
  • T. Koshy, "The Ends Of A Mersenne Prime And An Even Perfect Number", Journal of Recreational Mathematics, Baywood, NY, 1998, pp. 196-202.
  • Joseph S. Madachy, Madachy's Mathematical Recreations, New York: Dover Publications, Inc., 1979, p. 149 (First publ. by Charles Scribner's Sons, New York, 1966, under the title: Mathematics on Vacation).
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, pages 46-48, 244-245.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 83-87.
  • József Sándor and Borislav Crstici, Handbook of Number Theory, II, Springer Verlag, 2004.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Ian Stewart, L'univers des nombres, "Diviser Pour Régner", Chapter 14, pp. 74-81, Belin-Pour La Science, Paris, 2000.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, chapter 4, pages 127-149.
  • Horace S. Uhler, On the 16th and 17th perfect numbers, Scripta Math., Vol. 19 (1953), pp. 128-131.
  • André Weil, Number Theory, An approach through history, From Hammurapi to Legendre, Birkhäuser, 1984, p. 6.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, pp. 107-110, Penguin Books, 1987.

Crossrefs

See A000043 for the current state of knowledge about Mersenne primes.
Cf. A228058 for Euler's criterion for odd terms.
Positions of 0's in A033879 and in A033880.
Cf. A001065.

Programs

  • Haskell
    a000396 n = a000396_list !! (n-1)
    a000396_list = [x | x <- [1..], a000203 x == 2 * x]
    -- Reinhard Zumkeller, Jan 20 2012
    
  • Mathematica
    Select[Range[9000], DivisorSigma[1,#]== 2*# &] (* G. C. Greubel, Oct 03 2017 *)
    PerfectNumber[Range[15]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 10 2018 *)
  • PARI
    isA000396(n) = (sigma(n) == 2*n);
    
  • Python
    from sympy import divisor_sigma
    def ok(n): return n > 0 and divisor_sigma(n) == 2*n
    print([k for k in range(9999) if ok(k)]) # Michael S. Branicky, Mar 12 2022

Formula

The perfect number N = 2^(p-1)*(2^p - 1) is also multiplicatively p-perfect (i.e., A007955(N) = N^p), since tau(N) = 2*p. - Lekraj Beedassy, Sep 21 2004
a(n) = 2^A133033(n) - 2^A090748(n), assuming there are no odd perfect numbers. - Omar E. Pol, Feb 28 2008
a(n) = A000668(n)*(A000668(n)+1)/2, assuming there are no odd perfect numbers. - Omar E. Pol, Apr 23 2008
a(n) = A000217(A000668(n)), assuming there are no odd perfect numbers. - Omar E. Pol, May 09 2008
a(n) = Sum of the first A000668(n) positive integers, assuming there are no odd perfect numbers. - Omar E. Pol, May 09 2008
a(n) = A000384(A019279(n)), assuming there are no odd perfect numbers and no odd superperfect numbers. a(n) = A000384(A061652(n)), assuming there are no odd perfect numbers. - Omar E. Pol, Aug 17 2008
a(n) = A006516(A000043(n)), assuming there are no odd perfect numbers. - Omar E. Pol, Aug 30 2008
From Reikku Kulon, Oct 14 2008: (Start)
A144912(2, a(n)) = 1;
A144912(4, a(n)) = -1 for n > 1;
A144912(8, a(n)) = 5 or -5 for all n except 2;
A144912(16, a(n)) = -4 or -13 for n > 1. (End)
a(n) = A019279(n)*A000668(n), assuming there are no odd perfect numbers and odd superperfect numbers. a(n) = A061652(n)*A000668(n), assuming there are no odd perfect numbers. - Omar E. Pol, Jan 09 2009
a(n) = A007691(A153800(n)), assuming there are no odd perfect numbers. - Omar E. Pol, Jan 14 2009
Even perfect numbers N = K*A000203(K), where K = A019279(n) = 2^(p-1), A000203(A019279(n)) = A000668(n) = 2^p - 1 = M(p), p = A000043(n). - Lekraj Beedassy, May 02 2009
a(n) = A060286(A016027(n)), assuming there are no odd perfect numbers. - Omar E. Pol, Dec 13 2012
For n >= 2, a(n) = Sum_{k=1..A065549(n)} (2*k-1)^3, assuming there are no odd perfect numbers. - Derek Orr, Sep 28 2013
a(n) = A275496(2^((A000043(n) - 1)/2)) - 2^A000043(n), assuming there are no odd perfect numbers. - Daniel Poveda Parrilla, Aug 16 2016
a(n) = A156552(A324201(n)), assuming there are no odd perfect numbers. - Antti Karttunen, Mar 28 2019
a(n) = ((2^(A000043(n)))^3 - (2^(A000043(n)) - 1)^3 - 1)/6, assuming there are no odd perfect numbers. - Jules Beauchamp, Jun 06 2025

Extensions

I removed a large number of comments that assumed there are no odd perfect numbers. There were so many it was getting hard to tell which comments were true and which were conjectures. - N. J. A. Sloane, Apr 16 2023
Reference to Albert H. Beiler's book updated by Harvey P. Dale, Jan 13 2025

A014224 Numbers k such that 3^k - 2 is prime.

Original entry on oeis.org

2, 4, 5, 6, 9, 22, 37, 41, 90, 102, 105, 317, 520, 541, 561, 648, 780, 786, 957, 1353, 2224, 2521, 6184, 7989, 8890, 19217, 20746, 31722, 37056, 69581, 195430, 225922, 506233, 761457, 1180181
Offset: 1

Views

Author

Keywords

Comments

If n is of the form 4k + 3 then 3^n - 2 is composite, because 3^n - 2 = (3^4)^k*3^3 - 2 == 0 (mod 5). So there is no term of the form 4k + 3. If Q is a perfect number such that gcd(3(3^a(n) - 2), Q) = 1 then x = 3^(a(n) - 1)*(3^a(n) - 2)*Q is a solution of the equation sigma(x) = 3x + Q. See comment lines of the sequences A058959 and A171271. - M. F. Hasler and Farideh Firoozbakht, Dec 07 2009
For all numbers n in this sequence, 3^(n-1)*(3^n-2) is a 2-hyperperfect number, cf. A007593, and no other 2-hyperperfect number seems to be known. - Farideh Firoozbakht and M. F. Hasler, Apr 25 2012
225922 is the last term in the sequence up to 500000. All n <= 500000 have been tested with the Miller-Rabin PRP test and/or PFGW. - Ryan Propper, Aug 18 2013
For n <= 506300 there is one additional term, 506233, a probable prime as tested by PFGW. - Ryan Propper, Sep 03 2013
a(35) > 10^6. - Ryan Propper, Jul 22 2015

References

  • Daniel Minoli, Sufficient Forms For Generalized Perfect Numbers, Ann. Fac. Sciences, Univ. Nation. Zaire, Section Mathem; Vol. 4, No. 2, Dec 1978, pp. 277-302. [From Daniel Minoli (daniel.minoli(AT)ses.com), Aug 26 2009]
  • Daniel Minoli, Voice over MPLS, McGraw-Hill, New York, NY, 2002, ISBN 0-07-140615-8 (pp. 114-134) [From Daniel Minoli (daniel.minoli(AT)ses.com), Aug 26 2009]
  • Daniel Minoli and W. Nakamine, Mersenne Numbers Rooted On 3 For Number Theoretic Transforms, 1980 IEEE International Conf. on Acoust., Speech and Signal Processing. [From Daniel Minoli (daniel.minoli(AT)ses.com), Aug 26 2009]

Crossrefs

3^n - 2 = A058481(n).

Programs

Extensions

Corrected by Andrey V. Kulsha, Feb 04 2001
a(26) = 19217, a(27) = 20746 from Ryan Propper, May 11 2007
a(28) = 31722 from Henri Lifchitz, Oct 2002
a(29) = 37056 from Henri Lifchitz, Oct 2004
a(30) = 69581 from Henri Lifchitz, Jan 2005
a(31) = 195430 from Theodore Burton, Feb 2007
a(32) = 225922 from Ryan Propper, Aug 18 2013
a(33) = 506233 from Ryan Propper, Sep 02 2013
a(34) = 761457 from Ryan Propper, Jul 22 2015
a(35) = 1180181 from Jorge Coveiro, May 22 2020

A246544 Consider the aliquot parts, in ascending order, of a composite number. Take their sum and repeat the process deleting the minimum number and adding the previous sum. The sequence lists the numbers that after some iterations reach a sum equal to themselves.

Original entry on oeis.org

6, 21, 28, 85, 496, 2133, 8128, 19521, 77125, 97273, 176661, 615281, 4948133, 33550336, 68353213, 129127041, 8589869056
Offset: 1

Views

Author

Paolo P. Lava, Aug 29 2014

Keywords

Comments

Similar to Keith numbers and Primonacci numbers, using proper divisors instead of digits or prime factors.
The perfect numbers A000396 are a subset.
The numbers of iterations are: 1, 2, 1, 3, 1, 2, 1, 2, 3, 4, 2, 5, ...; with 1 when the term is perfect. - Michel Marcus, Aug 30 2014
The 2-hyperperfect numbers A007593 are a subset, with number of iterations 2. - Michel Marcus, Sep 22 2014

Examples

			Aliquot parts of 85 are 1, 5 and 17:
  1 + 5 + 17 = 23;
  5 + 17 + 23 = 45;
  17 + 23 + 45 = 85.
Aliquot parts of 19521 are 1, 3, 9, 27, 81, 241, 723, 2169 and 6507:
  1 + 3 + 9 + 27 + 81 + 241 + 723 + 2169 + 6507 = 9761;
  3 + 9 + 27 + 81 + 241 + 723 + 2169 + 6507 + 9761 = 19521.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q,h)
    local a,b,k,n,t,v; v:=array(1..h);
    for n from 2 to q do if not isprime(n) then
    a:=sort([op(divisors(n))]); b:=nops(a)-1;
    for k from 1 to b do v[k]:=a[k]; od;
    t:=b+1; v[t]:=add(v[k],k=1..b);
    while v[t]
    				
  • Mathematica
    A246544 = {};
    For[n = 4, n <= 1000000, n++,
     If[PrimeQ[n], Continue[]];
     a = Most[Divisors[n]];
     sum = Total[a];
     While[sum < n, sum = Total[a = Join[Rest[a], {sum}]]];
     If[sum == n, AppendTo[A246544, n]];
    ]; A246544 (* Robert Price, Sep 08 2019 *)
  • PARI
    lista(nn) = {forcomposite(n=1, nn, d = divisors(n); v = vector(#d-1, i, d[i]); vs = sum(i=1, #v, v[i]); ind = 1; while (vs < n, v = concat(v, vs); vs += vs - v[ind]; ind++;); if (vs == n, print1(n, ", ")););} \\ Michel Marcus, Aug 29 2014
    
  • Python
    import math
    def divs(n):
        large_divisors = []
        for i in range(1, int(math.sqrt(n) + 1)):
            if n % i == 0:
                yield i
                if i !=  n // i:
                    large_divisors.insert(0, n / i)
        for divisor in large_divisors:
            yield divisor
    a = 2
    while a < 1000000000:
        q = list(divs(a))[:-1]
        r = sum(q)
        if r > a or len(q) == 1:
            pass
        elif r == a:
            print(a)
        else:
            c = 1
            while r < a:
                q.append(r)
                r = sum(q[c:])
                c += 1
            if r == a:
                print(a)
        a += 1
    # David Consiglio, Jr., Sep 09 2014
    
  • Python
    from sympy import divisors, isprime
    A246544_list = []
    for n in range(2,10**5):
        if not isprime(n):
            x = divisors(n)
            x.pop()
            y = sum(x)
            while y < n:
                x, y = x[1:]+[y], 2*y-x[0]
            if y == n:
                A246544_list.append(n)
    # Chai Wah Wu, Nov 03 2014

Extensions

a(13)-a(15) from Michel Marcus, Aug 29 2014
a(16) from David Consiglio, Jr., Sep 06 2014
a(17) from Lars Blomberg, Oct 27 2014

A014232 Primes of the form 3^k - 2.

Original entry on oeis.org

7, 79, 241, 727, 19681, 31381059607, 450283905890997361, 36472996377170786401, 8727963568087712425891397479476727340041447, 4638397686588101979328150167890591454318967698007
Offset: 1

Views

Author

Keywords

References

  • Daniel Minoli, Voice over MPLS, McGraw-Hill, New York, NY, 2002, ISBN 0-07-140615-8 (p.114-134) [From Daniel Minoli (daniel.minoli(AT)ses.com), Aug 26 2009]

Crossrefs

Cf. A000040, A007593, A014224 (corresponding k's).

Programs

Formula

a(n) = 3^A014224(n) - 2. - Elmo R. Oliveira, Nov 09 2023

A028499 6-hyperperfect numbers: n = 6*(sigma(n) - n - 1) + 1.

Original entry on oeis.org

301, 16513, 60110701, 1977225901, 2733834545701, 232630479398401, 336823287227717101
Offset: 1

Views

Author

Keywords

Comments

(7^k-6)*7^(k-1) is a term for all k in A191469. - Max Alekseyev, Nov 17 2019

Crossrefs

Programs

  • PARI
    isok(n) = 6*(sigma(n) - n - 1) + 1 == n; \\ Michel Marcus, Nov 18 2019

Extensions

a(5) from Donovan Johnson, Nov 20 2012
a(6) from Donovan Johnson confirmed by Max Alekseyev, Nov 17 2019
a(7) from Giovanni Resta confirmed by Max Alekseyev, May 23 2025

A028502 2772-hyperperfect numbers: n = 2772*(sigma(n)-n-1) + 1.

Original entry on oeis.org

95295817, 124035913, 749931337, 4275383113, 47268697363953913
Offset: 1

Views

Author

Keywords

Comments

10^19 < a(6) <= 186690534609915040044368953. - Max Alekseyev, Nov 30 2019

Crossrefs

Extensions

a(5) from Max Alekseyev, Nov 18 2019

A034916 31752-hyperperfect numbers: n = 31752*(sigma(n)-n-1) + 1.

Original entry on oeis.org

4660241041, 7220722321, 12994506001, 52929885457, 60771359377
Offset: 1

Views

Author

Keywords

Comments

No other terms below 10^19. - Max Alekseyev, Dec 01 2019

Crossrefs

A220290 4-hyperperfect numbers: n = 4*(sigma(n)-n-1) + 1.

Original entry on oeis.org

1950625, 1220640625, 186264514898681640625
Offset: 1

Views

Author

Arkadiusz Wesolowski, Dec 11 2012

Keywords

Comments

For all k in A059613, (5^k-4)*5^(k-1) is a term. In particular, k=15 gives a term 186264514898681640625.

Crossrefs

Programs

  • Mathematica
    Select[Range[1, 2*10^6, 4], # + 3 == 4*(DivisorSigma[1, #] - #) &]

Extensions

a(3) from Max Alekseyev, Jun 01 2025

A028500 12-hyperperfect numbers: n = 12*(sigma(n) - n - 1) + 1.

Original entry on oeis.org

697, 2041, 1570153, 62722153, 10604156641, 13544168521, 1792155938521
Offset: 1

Views

Author

Keywords

Comments

7056410014866537089009269921 is also a term. - Donovan Johnson, Nov 20 2012
Also terms: 13^7*815787979*11621986347871 and 13^23*542800770374370512771595349. - Giovanni Resta, Nov 18 2019
a(8) >= 10^17. - Max Alekseyev, Nov 22 2019

Crossrefs

Programs

  • PARI
    isok(n) = 12*(sigma(n) - n - 1) + 1 == n; \\ Michel Marcus, Nov 18 2019

Extensions

a(7) from Donovan Johnson, Nov 20 2012

A337342 Numbers k such that A048673(k) divides 1+A003973(k).

Original entry on oeis.org

1, 10, 584, 3824, 23008, 5033216
Offset: 1

Views

Author

Antti Karttunen, Aug 24 2020

Keywords

Comments

Numbers k such that A048673(k) = A337335(k). Equivalently, numbers k such that (A003961(k)+1)/2 divides 1+A003973(k).
No squares larger than one in this sequence => No quasiperfect numbers. See also A337339. For any x corresponding to a quasiperfect number qp = A003961(x), the quotient (1+A003973(x)) / A048673(x) should be 4. Thus that A003961(x) should also be a member of A325311.
At least for the terms x = a(2) .. a(6) here, the quotient (1+A003973(x)) / A048673(x) = 3. The terms for which the quotient is 3 are precisely those which by prime shifting become the terms of A007593 (that are all odd), thus the terms y = A064989(A007593(n)), for n >= 1, form a subsequence of this sequence.
a(7) > 2^28.
Terms 65810851904356352, 30943274395471606363637940224, 40102483616531202199118491418624 are also in the sequence, but their positions are unknown. (Adapted from Jud McCranie's Dec 16 1999 comment in A007593).

Crossrefs

Programs

  • PARI
    A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    isA337342(n) = { my(s=A003961(n)); !((1+sigma(s))%((1+s)/2)); };
Showing 1-10 of 14 results. Next