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 26 results. Next

A181701 Near-perfect numbers (A181595) of the form 2^(t-1)*(2^t-2^k-1), where 2^t-2^k-1 is prime, k>=1, t>k.

Original entry on oeis.org

12, 20, 56, 88, 104, 368, 464, 992, 1504, 1888, 1952, 16256, 24448, 28544, 30592, 32128, 98048, 122624, 128768, 130304, 507392, 521728, 522752, 2087936, 7337984, 8124416, 8353792, 8378368, 8382464, 25161728, 67100672, 125820928, 132112384, 133685248, 134193152
Offset: 1

Views

Author

Vladimir Shevelev, Nov 06 2010

Keywords

Comments

There exist near-perfect numbers of the form 2^r*p, where p is prime, which are not in the sequence (e.g., 24,40,224). For given k, the smallest value of t gives sequence A181692.

Crossrefs

Programs

  • Mathematica
    s = Sort@ Flatten@ Table[p = (2^t - 2^k - 1); If[PrimeQ@ p, 2^(t - 1) p, Nothing], {t, 2, 14}, {k, t - 1}]; Select[Select[s, DivisorSigma[1, #] > 2 # &], MemberQ[Divisors@ #, DivisorSigma[1, #] - 2 #] &] (* Michael De Vlieger, Sep 23 2015, after Alonso del Arte at A181595 *)
  • PARI
    mx=2^269*(2^270-2^122-1); v=vector(1000); n=0; for(k=1, 269, for(t=k+1, 270, p=2^t-2^k-1; m=2^(t-1)*p; if(m>mx, next(2)); if(isprime(p), n++; v[n]=m))); v=vecsort(v); for(n=1, 1000, write("b181701.txt", n " " v[n])) /* Donovan Johnson, May 24 2013 */

Extensions

Edited, corrected, and extended by D. S. McNeil, Nov 18 2010

A181596 Abundance of A181595(n).

Original entry on oeis.org

4, 3, 2, 12, 10, 8, 4, 2, 7, 56, 78, 8, 2, 2, 32, 16, 4, 2, 532, 152, 136, 8, 68, 31, 992, 128, 8, 64, 32, 16, 4, 8, 128, 32, 8, 2, 43648, 2528, 32, 4, 2, 32, 2272, 32, 32, 127, 16256, 32, 32, 4, 536, 8, 32, 8, 52, 16, 32, 41044, 64, 512, 128, 64, 16, 4, 2, 8
Offset: 1

Views

Author

Vladimir Shevelev, Nov 01 2010

Keywords

Comments

a(n) is a proper divisor of A181595(n).

Examples

			Since A181595(1)=12, a(1)=sigma(12)-2*12=28-24=4.
		

Crossrefs

Programs

  • Mathematica
    Reap[For[n = 12, n <= 2 10^7, n++, abn = DivisorSigma[1, n] - 2n; If[1 < abn < n && Divisible[n, abn], Print[{n, abn}]; Sow[abn]]]][[2, 1]] (* Jean-François Alcover, Oct 28 2018 *)

Formula

a(n) = A033880(A181595(n)).

Extensions

a(10)-a(11) corrected by Vladimir Shevelev, Nov 03 2010
Entries checked, definition shortened by R. J. Mathar, Nov 17 2010
More terms from Michel Marcus, Feb 06 2016

A181710 Near-perfect numbers (A181595) of the form m*2^p, where m = 2^(p-1)*(2^p-1) is a perfect number (A000396).

Original entry on oeis.org

24, 224, 15872, 1040384, 274844352512, 1125891316908032, 72057456598974464, 4951760154835678090382802944, 6129982163463555430774932117031404988667342368173719552
Offset: 1

Views

Author

Vladimir Shevelev, Nov 07 2010

Keywords

Crossrefs

Programs

  • Mathematica
    With[{p = MersennePrimeExponent[Range[10]]}, 2^(2*p - 1)*(2^p - 1)] (* Amiram Eldar, Apr 29 2024 *)

Formula

a(n) = A147538(A000043(n)). - Amiram Eldar, Apr 29 2024

Extensions

a(6)-a(9) from Amiram Eldar, Apr 29 2024

A181702 Numbers of the form 2^r*p with p an odd prime, which are in A181595 but not in A181701.

Original entry on oeis.org

24, 40, 224, 15872, 1040384
Offset: 1

Views

Author

Vladimir Shevelev, Nov 06 2010

Keywords

Comments

a(6) > 1.85*10^11, if it exists. - Amiram Eldar, Apr 29 2024

Crossrefs

Extensions

32128 removed by R. J. Mathar, Dec 05 2010
a(5) from Amiram Eldar, Apr 29 2024

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

A153501 Abundant numbers n such that n/(sigma(n)-2n) is an integer.

Original entry on oeis.org

12, 18, 20, 24, 40, 56, 88, 104, 120, 196, 224, 234, 368, 464, 650, 672, 992, 1504, 1888, 1952, 3724, 5624, 9112, 11096, 13736, 15376, 15872, 16256, 17816, 24448, 28544, 30592, 32128, 77744, 98048, 122624, 128768, 130304, 174592, 396896, 507392
Offset: 1

Views

Author

Donovan Johnson, Jan 02 2009

Keywords

Comments

Sigma(n)-2n is the abundance of n.
The only odd term in this sequence < 2*10^12 is 173369889. - Donovan Johnson, Feb 15 2012
Equivalently, the abundancy of n, ab=sigma(n)/n, satisfies the following relation: numerator(ab) = 2*denominator(ab)+1, that is, ab=(2k+1)/k where k is the integer ratio mentioned in definition. - Michel Marcus, Nov 07 2014
The tri-perfect numbers (A005820) are in this sequence, since their abundancy is 3n/n = 3 = (2k+1)/k with k=1. - Michel Marcus, Nov 07 2014

Examples

			The abundance of 174592 = sigma(174592)-2*174592 = 43648. 174592/43648 = 4.
		

Crossrefs

Intersection of A097498 and A005101.
Disjoint union of A181595 and A005820.

Programs

  • Maple
    filter:= proc(n) local s; s:= numtheory:-sigma(n); (s > 2*n) and (n mod (s-2*n) = 0) end proc:
    select(filter, [$1..10^5]); # Robert Israel, Nov 07 2014
  • Mathematica
    filterQ[n_] := Module[{s = DivisorSigma[1, n]}, s > 2n && Mod[n, s - 2n] == 0];
    Select[Range[10^6], filterQ] (* Jean-François Alcover, Feb 01 2023, after Robert Israel *)
  • PARI
    isok(n) = ((ab = (sigma(n)-2*n))>0) && (n % ab == 0) \\ Michel Marcus, Jul 16 2013
    
  • Sage
    def A153501_list(len):
        def is_A153501(n):
            t = sigma(n,1) - 2*n
            return t > 0 and t.divides(n)
        return filter(is_A153501, range(1,len))
    A153501_list(1000) # Peter Luschny, Nov 07 2014

A181598 Numbers m with divisor 8 | m and abundance sigma(m)-2*m = 8.

Original entry on oeis.org

56, 368, 11096, 17816, 77744, 128768, 2087936, 2291936, 13174976, 35021696, 45335936, 381236216, 4856970752, 6800228816, 8589344768, 1461083549696, 1471763808896, 2199013818368, 19502341651712, 118123076415296, 933386556194816, 144141575952121856, 417857739454939136
Offset: 1

Views

Author

Vladimir Shevelev, Nov 01 2010

Keywords

Comments

a(19) > 10^13. - Giovanni Resta, Apr 02 2014

Crossrefs

Programs

  • PARI
    isok(n) = !(n % 8) && (sigma(n) - 2*n == 8); \\ Michel Marcus, Feb 08 2016

Formula

A088833 INTERSECT A008590. - R. J. Mathar, Nov 04 2010

Extensions

Definition rephrased by R. J. Mathar, Nov 04 2010
a(16)-a(17) from Donovan Johnson, Dec 08 2011
a(18) from Giovanni Resta, Apr 02 2014
a(19)-a(23) from the b-file at A088833 added by Amiram Eldar, Mar 11 2024

A181741 Primes of the form 2^t-2^k-1, k>=1.

Original entry on oeis.org

3, 5, 7, 11, 13, 23, 29, 31, 47, 59, 61, 127, 191, 223, 239, 251, 383, 479, 503, 509, 991, 1019, 1021, 2039, 3583, 3967, 4079, 4091, 4093, 6143, 8191, 15359, 16127, 16319, 16381, 63487, 65407, 65519, 129023, 131063, 131071, 245759, 253951, 261631, 261887, 262079, 262111, 262127, 262139
Offset: 1

Views

Author

Vladimir Shevelev, Nov 08 2010

Keywords

Comments

All Mersenne primes A000668(i) are in the sequence, parametrized by t=A000043(i)+1 and k=A000043(i).
If p is in the sequence, then the exponents t and k are unique.
For given k, the smallest value of t defines sequence A181692.
Every term p=2^t-2^k-1 in this sequence here generates an entry 2^(t-1)*p in A181595 (cf. A181701).

Crossrefs

Cf. A010051, primes in A081118, see also A208083.

Programs

  • Haskell
    a181741 n = a181741_list !! (n-1)
    a181741_list = filter ((== 1) . a010051) a081118_list
    -- Reinhard Zumkeller, Feb 23 2012
    
  • Maple
    isA000079 := proc(n) if n = 1 then true; elif type(n,'odd') then false; else if nops( numtheory[factorset](n) ) = 1 then  true;  else
    false; end if; end if; end proc:
    isA181741 := proc(p) if isprime(p) then k := A007814(p+1) ; (p+1)/2^k+1 ; return ( isA000079(%) and k >=1 ) ; else
    false;  end if; end proc:
    for i from 1 to 1000 do p := ithprime(i) ; if isA181741(p) then printf("%d,",p) ; end if; end do: # R. J. Mathar, Nov 18 2010
  • Mathematica
    Select[Table[2^t-2^k-1, {t, 1, 20}, {k, 1, t-1}] // Flatten // Union, PrimeQ] (* Jean-François Alcover, Nov 16 2017 *)
  • PARI
    lista(nn) = {for (n=3, nn, forstep(k=n-1, 1, -1, if (isprime(p=2^n-2^k-1), print1(p, ", "));););} \\ Michel Marcus, Dec 17 2018
    
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A181741_gen(): # generator of terms
        m = 2
        for t in count(1):
            r=1<>=1
            m<<=1
    A181741_list = list(islice(A181741_gen(),30)) # Chai Wah Wu, Jul 08 2022

Formula

Conjecture: equals the intersection of A000040 and A081118 or the intersection of A000040 and A089633. [R. J. Mathar, Nov 18 2010]

Extensions

Corrected (251 and 1019 inserted) and extended by R. J. Mathar, Nov 18 2010

A181703 Numbers of the form 2^(t-1)*(2^t-3), where 2^t-3 is prime.

Original entry on oeis.org

20, 104, 464, 1952, 130304, 522752, 8382464, 134193152, 549754241024, 8796086730752, 140737463189504, 144115187270549504, 196159429230833773869868419445529014560349481041922097152, 3450873173395281893717377931138512601610429881249330192849350210617344
Offset: 1

Views

Author

Vladimir Shevelev, Nov 06 2010

Keywords

Comments

This is a subsequence of A181595. [Proof: sigma(m) = (2^t-1)*(2^t-2) leads to an abundance of m which is 2.]
Numbers m such that the sum of the even divisors of m equals the square of the odd divisors of m.
Proof: let s0 the sum of the even divisors and s1 the sum of the odd divisors.
s1 = 2^t-2 because 2^t-3 is prime.
s0 = 2 + 4 + 8 + ... + 2^(t-1) + (2^t - 3)(2 + 4 + 8 + ... + 2^(t-1)) = (2^t - 2)^2 => s0 = s1^2. - Michel Lagneau, Apr 17 2013

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 1 to 600000 do:x:=divisors(n):n0:=nops(x):s0:=0:s1:=0:for k from 1 to n0 do:if irem(x[k],2)=0 then s0:=s0+ x[k]:else s1:=s1+ x[k]:fi:od:if s0=s1^2 then print(n):else fi:od: # Michel Lagneau, Apr 17 2013
  • PARI
    for(k=1, 200, if(ispseudoprime(2^k-3), print1(2^(k-1)*(2^k-3), ", "))) \\ Eric Chen, Jun 13 2018

Formula

a(n) = 2^(A050414(n)-1) * (2^A050414(n) - 3). - Max Alekseyev, Jul 31 2025

Extensions

Edited and extended by D. S. McNeil, Nov 18 2010
Definition simplified by R. J. Mathar, Nov 18 2010

A181597 (N\{4})-perfect numbers, i.e., numbers m for which sigma(m)-4 = 2m, if 4|m, otherwise sigma(m) = 2m.

Original entry on oeis.org

6, 12, 88, 1888, 32128, 521728, 1848964, 8378368, 34359083008, 549753192448
Offset: 1

Views

Author

Vladimir Shevelev, Nov 01 2010, Nov 03 2010

Keywords

Comments

Or union of {6}, near-perfect numbers m (cf. A181595) for which d(m)=4, and all odd perfect numbers (if they exist). Note that (N\{2})-perfect numbers are numbers for which sigma(m)-2=2m, if m is even, and sigma(m)=2m, if m is odd. They are all even numbers of A045768 and all odd perfect numbers (if they exist).

Examples

			88 is in the sequence since sigma(88) = 180 and 180 - 4 = 2*88.
		

Crossrefs

Extensions

Invalid term removed and a(8)-a(10) from Donovan Johnson, Sep 14 2013
Showing 1-10 of 26 results. Next