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 11 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

A002496 Primes of the form k^2 + 1.

Original entry on oeis.org

2, 5, 17, 37, 101, 197, 257, 401, 577, 677, 1297, 1601, 2917, 3137, 4357, 5477, 7057, 8101, 8837, 12101, 13457, 14401, 15377, 15877, 16901, 17957, 21317, 22501, 24337, 25601, 28901, 30977, 32401, 33857, 41617, 42437, 44101, 50177
Offset: 1

Views

Author

Keywords

Comments

It is conjectured that this sequence is infinite, but this has never been proved.
An equivalent description: primes of form P = (p1*p2*...*pm)^k + 1 where p1..pm are primes and k > 1, since then k must be even for P to be prime.
Also prime = p(n) if A054269(n) = 1, i.e., quotient-cycle-length = 1 in continued fraction expansion of sqrt(p). - Labos Elemer, Feb 21 2001
Also primes p such that phi(p) is a square.
Also primes of form x*y + z, where x, y and z are three successive numbers. - Giovanni Teofilatto, Jun 05 2004
It is a result that goes back to Mirsky that the set of primes p for which p-1 is squarefree has density A, where A = A005596 denotes the Artin constant. More precisely, Sum_{p <= x} mu(p-1)^2 = A*x/log x + o(x/log x) as x tends to infinity. Conjecture: Sum_{p <= x, mu(p-1)=1} 1 = (A/2)*x/log x + o(x/log x) and Sum_{p <= x, mu(p-1)=-1} 1 = (A/2)*x/log x + o(x/log x). - Pieter Moree (moree(AT)mpim-bonn.mpg.de), Nov 03 2003
Also primes of the form x^y + 1, where x > 0, y > 1. Primes of the form x^y - 1 (x > 0, y > 1) are the Mersenne primes listed in A000668(n) = {3, 7, 31, 127, 8191, 131071, 524287, 2147483647, ...}. - Alexander Adamchuk, Mar 04 2007
With the exception of the first two terms {2,5}, the continued fraction (1 + sqrt(p))/2 has period 3. - Artur Jasinski, Feb 03 2010
With the exception of the first term {2}, congruent to 1 (mod 4). - Artur Jasinski, Mar 22 2011
With the exception of the first two terms, congruent to 1 or 17 (mod 20). - Robert Israel, Oct 14 2014
From Bernard Schott, Mar 22 2019: (Start)
These primes are the primitive terms which generate the sequence of integers with only one prime factor and whose Euler's totient is a square: A054755. So this sequence is a subsequence of A054755 and of A039770. Additionally, the terms of this sequence also have a square cototient, so this sequence is a subsequence of A063752 and A054754.
If p prime = n^2 + 1, phi(p) = n^2 and cototient(p) = 1^2.
Except for 3, the four Fermat primes in A019434 {5, 17, 257, 65537}, belong to this sequence; with F_k = 2^(2^k) + 1, phi(F_k) = (2^(2^(k-1)))^2.
See the file "Subfamilies and subsequences" (& I) in A039770 for more details, proofs with data, comments, formulas and examples. (End)
In this sequence, primes ending with 7 seem to appear twice as often as primes ending with 1. This is because those with 7 come from integers ending with 4 or 6, while those with 1 come only from integers ending with 0 (see De Koninck & Mercier reference). - Bernard Schott, Nov 29 2020
The set of odd primes p for which every elliptic curve of the form y^2 = x^3 + d*x has order p-1 over GF(p) for those d with (d,p)=1 and d a fourth power modulo p. - Gary Walsh, Sep 01 2021 [edited, Gary Walsh, Apr 26 2025]

References

  • Jean-Marie De Koninck & Armel Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 211 pp. 34 and 169, Ellipses, Paris, 2004.
  • Leonhard Euler, De numeris primis valde magnis (E283), reprinted in: Opera Omnia. Teubner, Leipzig, 1911, Series (1), Vol. 3, p. 22.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, th. 17.
  • Hugh L. Montgomery, Ten Lectures on the Interface Between Analytic Number Theory and Harmonic Analysis, Amer. Math. Soc., 1996, p. 208.
  • C. Stanley Ogilvy, Tomorrow's Math. 2nd ed., Oxford Univ. Press, 1972, p. 116.
  • 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).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 118.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers (Rev. ed. 1997), p. 134.

Crossrefs

Cf. A083844 (number of these primes < 10^n), A199401 (growth constant).
Cf. A000668 (Mersenne primes), A019434 (Fermat primes).
Subsequence of A039770.
Cf. A010051, subsequence of A002522.
Cf. A237040 (an analog for n^3 + 1).
Cf. A010051, A000290; subsequence of A028916.
Subsequence of A039770, A054754, A054755, A063752.
Primes of form n^2+b^4, b fixed: A243451 (b=2), A256775 (b=3), A256776 (b=4), A256777 (b=5), A256834 (b=6), A256835 (b=7), A256836 (b=8), A256837 (b=9), A256838 (b=10), A256839 (b=11), A256840 (b=12), A256841 (b=13).
Cf. A030430 (primes ending with 1), A030432 (primes ending with 7).

Programs

  • Haskell
    a002496 n = a002496_list !! (n-1)
    a002496_list = filter ((== 1) . a010051') a002522_list
    -- Reinhard Zumkeller, May 06 2013
    
  • Magma
    [p: p in PrimesUpTo(100000)| IsSquare(p-1)]; // Vincenzo Librandi, Apr 09 2011
    
  • Maple
    select(isprime, [2, seq(4*i^2+1, i= 1..1000)]); # Robert Israel, Oct 14 2014
  • Mathematica
    Select[Range[100]^2+1, PrimeQ]
    Join[{2},Select[Range[2,300,2]^2+1,PrimeQ]] (* Harvey P. Dale, Dec 18 2018 *)
  • PARI
    isA002496(n) = isprime(n) && issquare(n-1) \\ Michael B. Porter, Mar 21 2010
    
  • PARI
    is_A002496(n)=issquare(n-1)&&isprime(n) \\ For "random" numbers in the range 10^10 and beyond, at least 5 times faster than the above. - M. F. Hasler, Oct 14 2014
    
  • Python
    # Python 3.2 or higher required
    from itertools import accumulate
    from sympy import isprime
    A002496_list = [n+1 for n in accumulate(range(10**5),lambda x,y:x+2*y-1) if isprime(n+1)] # Chai Wah Wu, Sep 23 2014
    
  • Python
    # Python 2.4 or higher required
    from sympy import isprime
    A002496_list = list(filter(isprime, (n*n+1 for n in range(10**5)))) # David Radcliffe, Jun 26 2016

Formula

There are O(sqrt(n)/log(n)) terms of this sequence up to n. But this is just an upper bound. See the Bateman-Horn or Wolf papers, for example, for the conjectured for what is believed to be the correct density.
a(n) = 1 + A005574(n)^2. - R. J. Mathar, Jul 31 2015
Sum_{n>=1} 1/a(n) = A172168. - Amiram Eldar, Nov 14 2020
a(n+1) = 4*A001912(n)^2 + 1. - Hal M. Switkay, Apr 03 2022

Extensions

Formula, reference, and comment from Charles R Greathouse IV, Aug 24 2009
Edited by M. F. Hasler, Oct 14 2014

A246551 Prime powers p^e where p is a prime and e is odd.

Original entry on oeis.org

2, 3, 5, 7, 8, 11, 13, 17, 19, 23, 27, 29, 31, 32, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 125, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 243, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313
Offset: 1

Views

Author

Joerg Arndt, Aug 29 2014

Keywords

Comments

These are the integers with only one prime factor whose cototient is square, so this sequence is a subsequence of A063752. Indeed, cototient(p^(2k+1)) = (p^k)^2 and cototient(p) = 1 = 1^2. - Bernard Schott, Jan 08 2019
With 1 prepended, this sequence is the lexicographically earliest sequence of distinct numbers whose partial products are all numbers whose exponents in their prime power factorization are squares (A197680). - Amiram Eldar, Sep 24 2024

Crossrefs

Cf. A000961, A246547, A246549, A168363, A197680, subsequence of A171561.
Cf. also A056798 (prime powers with even exponents >= 0).
Subsequence of A063752.

Programs

  • Magma
    [n:n in [2..1000]| #PrimeDivisors(n) eq 1 and IsSquare(n-EulerPhi(n))]; // Marius A. Burtea, May 15 2019
    
  • Mathematica
    Take[Union[Flatten[Table[Prime[n]^(k + 1), {n, 100}, {k, 0, 14, 2}]]], 100] (* Vincenzo Librandi, Jan 10 2019 *)
  • PARI
    for(n=1, 10^4, my(e=isprimepower(n)); if(e%2==1, print1(n, ", ")))
    
  • Python
    from sympy import primepi, integer_nthroot
    def A246551(n):
        def f(x): return int(n-1+x-sum(primepi(integer_nthroot(x,k)[0])for k in range(1,x.bit_length(),2)))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 13 2024

A054755 Odd powers of primes of the form q = x^2 + 1 (A002496).

Original entry on oeis.org

2, 5, 8, 17, 32, 37, 101, 125, 128, 197, 257, 401, 512, 577, 677, 1297, 1601, 2048, 2917, 3125, 3137, 4357, 4913, 5477, 7057, 8101, 8192, 8837, 12101, 13457, 14401, 15377, 15877, 16901, 17957, 21317, 22501, 24337, 25601, 28901, 30977, 32401
Offset: 1

Views

Author

Labos Elemer, Apr 25 2000

Keywords

Comments

A002496 is a subset; the odd power exponent is 1.
From Bernard Schott, Mar 16 2019: (Start)
The terms of this sequence are exactly the integers with only one prime factor and whose Euler's totient is square, so this sequence is a subsequence of A039770. The primitive terms of this sequence are the primes of the form q = x^2 + 1, which are exactly in A002496.
Additionally, the terms of this sequence also have a square cototient, so this sequence is a subsequence of A063752 and A054754.
If q prime = x^2 + 1, phi(q) = x^2, phi(q^(2k+1)) = (x*q^k)^2, and cototient(q) = 1^2, cototient(q^(2k+1)) = (q^k)^2. (End)

Examples

			a(20) = 3125 = 5^5, q = 5 = 4^2+1 and Phi(3125) = 2500 = 50^2, cototient(3125) = 3125 - Phi(3125) = 625 = 25^2.
		

Crossrefs

Cf. A000010, A051953, A039770, A063752, A054754, A334745 (with 2 distinct prime factors), A306908 (with 3 distinct prime factors).
Subsequences: A002496 (primitive primes: m^2+1), A004171 (2^(2k+1)), A013710 (5^(2k+1)), A013722 (17^(2k+1)), A262786 (37^(2k+1)).

Programs

  • Mathematica
    Select[Range[10^5], And[PrimeNu@ # == 1, IntegerQ@ Sqrt@ EulerPhi@ #] &] (* Michael De Vlieger, Mar 31 2019 *)
  • PARI
    isok(m) = (omega(m)==1) && issquare(eulerphi(m)); \\ Michel Marcus, Mar 16 2019
    
  • PARI
    upto(n) = {my(res = List([2]), q); forstep(i = 2, sqrtint(n), 2, if(isprime(i^2 + 1), listput(res, i^2 + 1) ) ); q = #res; forstep(i = 3, logint(n, 2), 2, for(j = 1, q, c = res[j]^i; if(c <= n, listput(res, c) , next(2) ) ) ); listsort(res); res } \\ David A. Corneth, Mar 17 2019

Formula

A000010(a(n)) = (q^(2k))*(q-1) and A051953(a(n)) = q^(2k), where q = 1 + x^2 and is prime.

A306670 Numbers k with exactly three distinct prime factors and such that cototient(k) is a square.

Original entry on oeis.org

345, 465, 468, 1332, 1545, 1833, 1872, 2628, 2737, 2769, 3105, 3145, 3585, 3657, 3945, 4081, 4100, 4185, 4212, 4345, 5328, 6465, 6516, 6785, 6945, 7105, 7488, 8428, 8569, 8625, 8961, 10257, 10512, 10785, 10833, 10945, 11625, 11988, 12132, 12865
Offset: 1

Views

Author

Bernard Schott, Mar 04 2019

Keywords

Comments

The integers with only one prime factor and whose cototient is a square are in A246551. The integers with two prime factors and whose cototient is a square are in A323916, and the subsequences A323917 and A323918.
There are exactly three different families of integers which realize a partition of this sequence. See the file "Subfamilies and subsequences" (& III) in A063752 for more details, proofs with data, comments, formulas and examples.

Examples

			1st family: 2769 = 3 * 13 * 71 and cototient(2769) = 33^2.
2nd family: 14841 = 3^2 * 17 * 97 and cototient(14841) = 75^2.
3rd family: 1872 = 2^4 * 3^2 * 13 and cototient(1872) = 36^2.
		

Crossrefs

Subsequence of A063752.
Cf. A246551 (only one prime factor), A323916, A323917, A323918 (two prime factors), A000396 (even perfect numbers).

Formula

1st family: The primitive terms are p*q*r with p,q,r primes and cototient(p*q*r) = p*q*r-(p-1)*(q-1)*(r-1) = M^2. These primitives generate the entire family formed by the numbers k = p^(2s+1) * q^(2t+1) * r^(2u+1) with s,t,u >=0, and cototient(k) = (p^s * q^t * r^u * M)^2.
2nd family: The primitive terms are p^2 *q * r with p,q,r primes and cototient(p^2 * q * r) = p * (p*q*r-(p-1)*(q-1)*(r-1)) = M^2. These primitives generate the entire family formed by the numbers k = p^(2s) * q^(2t+1) * r^(2u+1) with s>=1, t,u >=0, and cototient(k) = (p^(s-1) * q^t * r^u * M)^2.
3rd family: The primitive terms are p^2 * q^2 * r with p,q,r primes and cototient(p^2 * q^2 * r) = p * q * (p*q*r-(p-1)*(q-1)*(r-1)) = M^2. These primitives generate the entire family formed by the numbers k = p^(2s) * q^(2t) * r^(2u+1) with s,t>=1, u >=0, and cototient(k) = (p^(s-1) * q^(t-1) * r^u * M)^2.

A054754 Totient(n) and cototient(n) are squares.

Original entry on oeis.org

1, 2, 5, 8, 17, 32, 37, 101, 125, 128, 197, 257, 401, 468, 512, 577, 677, 1297, 1417, 1601, 1872, 2048, 2340, 2917, 3125, 3137, 3145, 4100, 4212, 4357, 4913, 5477, 7057, 7488, 8101, 8192, 8837, 9360, 12101, 13457, 14401, 14841, 15377, 15588, 15877
Offset: 1

Views

Author

Labos Elemer, Apr 25 2000

Keywords

Comments

Subsequence of A039770, supersequence of A002496.
a(n) is an odd power of a prime q = w^2+1, like 4913 = 17^3, where A000010(a(31)) = phi(4913) = 4624 = 68^2 and A051953(4913) = 4913-4624 = 289 = 17^2.
a(n) is not an odd power of a prime of A002496, like a(14) = 468, where phi(468) = 144 and 468-phi(468) = 324 = 18^2.
Intersection of A039770 and A063752. - Altug Alkan, Aug 16 2017

Crossrefs

Programs

  • Mathematica
    Select[Range@ 16000, Function[n, AllTrue[{#, n - #} &@ EulerPhi@ n, IntegerQ@ Sqrt@ # &]]] (* Michael De Vlieger, Aug 16 2017 *)
  • PARI
    isok(n) = issquare(eulerphi(n)) && issquare(n-eulerphi(n)); \\ Michel Marcus, Sep 09 2013

Formula

A000010(a(n))=x^2 and a(n)-A000010(a(n))=y^2.

A323916 Numbers k with exactly two distinct prime divisors and such that cototient(k) is a square.

Original entry on oeis.org

6, 21, 24, 28, 54, 68, 69, 96, 112, 124, 133, 141, 189, 216, 237, 272, 284, 301, 384, 388, 448, 481, 486, 496, 501, 508, 589, 621, 657, 669, 781, 796, 864, 964, 1025, 1029, 1077, 1088, 1136, 1141, 1269, 1317, 1348, 1357, 1372, 1417, 1536, 1537, 1552, 1701, 1792, 1796
Offset: 1

Views

Author

Bernard Schott, Feb 09 2019

Keywords

Comments

The integers with only one prime factor and whose cototient is a square are in A246551.
This sequence is the intersection of A007774 and A063752.
There are exactly two different families of integers which realize a partition of this sequence (A323917 and A323918); there is also another family with the even perfect numbers of A000396 which is a subsequence of this sequence.
See the file "Subfamilies of terms" (& II) in A063752 for more details, proofs with data, comments, formulas and examples.

Examples

			1st family: 189 = 3^3 * 7 and cototient(189) = 9^2;
2nd family: 272 = 2^4 * 17 and cototient(272) = 12^2;
3rd family: 8128 = 2^6 * 127 and cototient(8128) = 64^2.
		

Crossrefs

Subsequence of A063752.
Cf. A051953.

Programs

  • Mathematica
    Select[Range[1800], 2 == Length@ FactorInteger@ # == 2 && IntegerQ@ Sqrt[# - EulerPhi@ #] &] (* Giovanni Resta, Feb 27 2019 *)
    Select[Range[2000],PrimeNu[#]==2&&IntegerQ[Sqrt[#-EulerPhi[#]]]&] (* Harvey P. Dale, Jan 06 2022 *)
  • PARI
    isok(n) = (omega(n)==2) && issquare(n - eulerphi(n)); \\ Michel Marcus, Feb 10 2019
    
  • Sage
    [n for n in (1..2500) if len([1 for d in divisors(n) if is_prime(d)])==2 and is_square(n - euler_phi(n))] # G. C. Greubel, Mar 01 2019

Formula

1st family (A323917): if k = p^(2s+1) * q^(2t+1) with s,t >=0, p, q primes and p + q - 1 = M^2, then cototient(k) = (p^r * q^s * M)^2. The primitive terms are p*q with cototient(p*q) = p+q-1 = M^2
2nd family (A323918): if k = p^(2s) * q^(2t+1) with s>=1, t>=0, p, q primes, p < q and such that p*(p+q-1)= M^2, then cototient(k) = (p^(s-1) * q^t * M)^2. The primitive terms are p^2 *q with cototient(p^2 * q) = p * (p+q-1) = M^2
3rd family (A000396): the even perfect Numbers, if 2^p - 1 is a Mersenne prime, then cototient(2^(p-1) * (2^p - 1)) = (2^(p-1))^2.

A323917 Numbers k with exactly two distinct prime divisors and such that cototient(k) is square, where k = p^(2s+1) * q^(2t+1) with s,t >=0, p, q primes and p + q - 1 = M^2.

Original entry on oeis.org

6, 21, 24, 54, 69, 96, 133, 141, 189, 216, 237, 301, 384, 481, 486, 501, 589, 621, 669, 781, 864, 1029, 1077, 1141, 1269, 1317, 1357, 1417, 1536, 1537, 1701, 1944, 1957, 1981, 2041, 2133, 2181, 2517, 2869, 3261, 3397, 3456, 3601, 3661, 3669, 4101, 4309, 4333, 4374, 4509
Offset: 1

Views

Author

Bernard Schott, Feb 09 2019

Keywords

Comments

This is the first subsequence of A323916, the second one is A323918 and A323916 = {this sequence} Union A323918 with empty intersection.
Some values of (k,p,q,M): (6,2,3,2), (21,3,7,3), (69,3,23,5), (133,7,19,5), (141,3,47,9), (301,7,43,7), (481,13,37,7).
The primitive terms of this sequence are the products p * q, with p,q which satisfy p+q-1 = M^2, the first ones are: 6, 21, 69, 133, 141, 237. Then the integers (p*q) * p^2 and (p*q) * q^2 are new terms of the general sequence.
There is only one even perfect number in this sequence: 6. The other ones are in A323918.
See the file "Subsequences and Subfamilies of terms" (&2.1) in A063752 for more details, proofs with data, comments, formulas and examples.

Examples

			Perfect number 6 = 2 * 3 and cototient(6) = 2^2.
781 = 11 * 71 and cototient(781) = 11 + 71 - 1 = 9^2.
864 = 2^5 * 3^3 and cototient(864)= (2^2 * 3^1 * 2)^2 = 24^2.
		

Crossrefs

Programs

  • PARI
    isok(n) = (omega(n)==2) && issquare(n - eulerphi(n)) && ((factor(n)[1,2] % 2) == (factor(n)[2,2] % 2)); \\ Michel Marcus, Feb 10 2019

Formula

cototient(p*q) = p + q - 1 = M^2 for primitive terms.
cototient(k) = (p^s * q^t * M)^2 with k as in the name of this sequence.

A323918 Numbers k with exactly two distinct prime divisors and such that cototient(k) is a square, where: k = p^(2s) * q^(2t+1) with s >= 1, t >= 0, p <> q primes and such that p * (p+q-1) = M^2.

Original entry on oeis.org

28, 68, 112, 124, 272, 284, 388, 448, 496, 508, 657, 796, 964, 1025, 1088, 1136, 1348, 1372, 1552, 1792, 1796, 1984, 2032, 2169, 2308, 2588, 3184, 3524, 3856, 3868, 4352, 4544, 4604, 4996, 5392, 5488, 5913, 6025, 6057, 6208, 6268, 7168, 7184, 7936, 8128, 9232, 9244
Offset: 1

Views

Author

Bernard Schott, Feb 09 2019

Keywords

Comments

This is the second subsequence of A323916, the first one is A323917.
Some values of (k,p,q,M): (28,2,7,2), (68,2,17,3), (124,2,31,4), (284,2,71,6), (388,97,7), (657,3,73,5).
The primitive terms of this sequence are the products p^2 * q, with p,q which satisfy p*(p+q-1) = M^2; the first ones are 28, 68, 124, 284, 388, 508, 657, 796. Then, the integers (p^2 * q) * p^2 and (p^2 * q) * q^2 are new terms of the general sequence.
Except 6, all the even perfect numbers of A000396 belong to this sequence.
See the file "Subfamilies of terms" in A063752 for more details, proofs with data, comments, formulas and examples.

Examples

			272 = 2^4 * 17, M = 2*(2+17-1) = 6^2 and cototient(272) = (2^1 * 17^0 * 6)^2 = 12^2.
1025 = 5^2 * 41 and cototient(1025) = 5 * (5+41-1) = 15^2.
Perfect number: 8128 = 2^6 * 127 and cototient(8128) = 64^2.
		

Crossrefs

Programs

  • PARI
    isok(n) = (omega(n)==2) && issquare(n - eulerphi(n)) && ((factor(n)[1,2] % 2) != (factor(n)[2,2] % 2)); \\ Michel Marcus, Feb 10 2019

Formula

cototient(p^2 * q) = p * (p + q - 1) = M^2;
cototient(k) = (p^(s-1) * q^t * M)^2 with k as in the name of this sequence.

A054756 Numbers k such that phi(k) and cototient(k) are squares but k is not in A054755.

Original entry on oeis.org

1, 468, 1417, 1872, 2340, 3145, 4100, 4212, 7488, 9360, 14841, 15588, 16400, 16848, 20329, 21060, 29952, 31417, 37440, 37908, 45097, 49833, 58500, 62352, 63529, 63945, 65600, 67392, 69700, 78625, 79092, 83569, 84169, 84240, 88929, 102500
Offset: 1

Views

Author

Labos Elemer, Apr 25 2000

Keywords

Examples

			An even term is 2340 = 4*9*5*13 (phi = 576 = 24^2 and cototient = 1764 =  42^2).
An odd term is 14841 = 9*17*97 (phi = 9216 = 96^2, cototient = 5625 = 75^2).
		

Crossrefs

Equals A054754 \setminus A054755. See also A063752.

Programs

  • Mathematica
    Select[ Range[ 1, 200000 ], IntegerQ[ Sqrt[ eu[ # ] ] ]&& IntegerQ[ Sqrt[ co[ # ] ] ]&&!Equal[ lfi[ # ], 1 ]& ], where eu[ x_ ] =EulerPhi[ x ], co[ x_ ]=x-EulerPhi[ x ] and lfi[ x_ ]=Length[ FactorInteger[ x ] ]

Formula

phi(a(n)) = x^2, a(n) - phi(a(n)) = y^2, a(n) is not an odd power of prime from A002496.
Showing 1-10 of 11 results. Next