[go: up one dir, main page]

login
A030513
Numbers with 4 divisors.
40
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,1
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.
FORMULA
{n : A000005(n) = 4}. - Juri-Stepan Gerasimov, Oct 10 2009
MATHEMATICA
Select[Range[200], DivisorSigma[0, #]==4&] (* Harvey P. Dale, Apr 06 2011 *)
PROG
(PARI) is(n)=numdiv(n)==4 \\ Charles R Greathouse IV, May 18 2015
(Magma) [n: n in [1..200] | DivisorSigma(0, n) eq 4]; // Vincenzo Librandi, Jul 16 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
CROSSREFS
Equals the disjoint union of A006881 and A030078.
Sequence in context: A291127 A211337 A007422 * A161918 A294729 A242270
KEYWORD
nonn,easy,nice
AUTHOR
EXTENSIONS
Incorrect comments removed by Charles R Greathouse IV, Mar 18 2010
STATUS
approved