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.

A162143 Numbers that are the squares of the product of three distinct primes.

Original entry on oeis.org

900, 1764, 4356, 4900, 6084, 10404, 11025, 12100, 12996, 16900, 19044, 23716, 27225, 28900, 30276, 33124, 34596, 36100, 38025, 49284, 52900, 53361, 56644, 60516, 65025, 66564, 70756, 74529, 79524, 81225, 81796, 84100, 96100, 101124, 103684, 119025, 125316, 127449
Offset: 1

Views

Author

Keywords

Comments

Numbers that are the product of exactly 3 distinct squares of primes (p^2*q^2*r^2).

Examples

			900 = 2^2*3^2*5^2, 1764 = 2^2*3^2*7^2, 4356 = 2^2*3^2*11^2, ..
		

Crossrefs

Programs

  • Maple
    h := proc(n) local P; P := NumberTheory:-PrimeFactors(n); nops(P) = 3 and n = mul(P) end:
    A162143List := upto -> seq(n^2, n=select(h, [seq(1..upto)])):  # Peter Luschny, Apr 14 2025
  • Mathematica
    fQ[n_]:=Last/@FactorInteger[n]=={2,2,2}; Select[Range[100000], f]
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A162143(n):
        def f(x): return int(n+x-sum(primepi(x//(k*m))-b for a,k in enumerate(primerange(integer_nthroot(x,3)[0]+1),1) for b,m in enumerate(primerange(k+1,isqrt(x//k)+1),a+1)))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        return bisection(f)**2 # Chai Wah Wu, Aug 29 2024
    
  • SageMath
    def is_a(n):
        P = prime_divisors(n)
        return len(P) == 3 and prod(P) == n
    print([n*n for n in range(1, 439) if is_a(n)]) # Peter Luschny, Apr 14 2025

Formula

a(n) = A007304(n)^2.
A050326(a(n)) = 8. - Reinhard Zumkeller, May 03 2013
Sum_{n>=1} 1/a(n) = (P(2)^3 + 2*P(6) - 3*P(2)*P(4))/6 = (A085548^3 + 2*A085966 - 3*A085548*A085964)/6 = 0.0036962441..., where P is the prime zeta function. - Amiram Eldar, Oct 30 2020

Extensions

Edited by N. J. A. Sloane, Jun 27 2009