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.

A030513 Numbers with 4 divisors.

Original entry on oeis.org

6, 8, 10, 14, 15, 21, 22, 26, 27, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 122, 123, 125, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 166, 177, 178, 183, 185, 187
Offset: 1

Views

Author

Keywords

Comments

Essentially the same as A007422.
Numbers which are either the product of two distinct primes (A006881) or the cube of a prime (A030078).
4*a(n) are the solutions to A048272(x) = Sum_{d|x} (-1)^d = 4. - Benoit Cloitre, Apr 14 2002
Since A119479(4)=3, there are never more than 3 consecutive integers in the sequence. Triples of consecutive integers start at 33, 85, 93, 141, 201, ... (A039833). No such triple contains a term of the form p^3. - Ivan Neretin, Feb 08 2016
Numbers that are equal to the product of their proper divisors (A007956) (proof in Sierpiński). - Bernard Schott, Apr 04 2022

References

  • Wacław Sierpiński, Elementary Theory of Numbers, Ex. 2 p. 174, Warsaw, 1964.

Crossrefs

Equals the disjoint union of A006881 and A030078.

Programs

  • Magma
    [n: n in [1..200] | DivisorSigma(0, n) eq 4]; // Vincenzo Librandi, Jul 16 2015
    
  • Mathematica
    Select[Range[200], DivisorSigma[0,#]==4&] (* Harvey P. Dale, Apr 06 2011 *)
  • PARI
    is(n)=numdiv(n)==4 \\ Charles R Greathouse IV, May 18 2015
    
  • Python
    from math import isqrt
    from sympy import primepi, integer_nthroot, primerange
    def A030513(n):
        def f(x): return int(n+x-primepi(integer_nthroot(x,3)[0])+(t:=primepi(s:=isqrt(x)))+(t*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1)))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Aug 16 2024

Formula

{n : A000005(n) = 4}. - Juri-Stepan Gerasimov, Oct 10 2009

Extensions

Incorrect comments removed by Charles R Greathouse IV, Mar 18 2010