OFFSET
1,1
COMMENTS
Cubes of primes together with products of a prime and the square of a different prime.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
Kalle Siukola, Python program
MAPLE
N:= 1000: # for terms <= N
P:= select(isprime, [2, seq(i, i=3..N/4, 2)]): nP:= nops(P):
sort(select(`<=`, [seq(seq(P[i]*P[j]^2, i=1..nP), j=1..nP)], N)); # Robert Israel, Oct 20 2024
MATHEMATICA
Select[Range[452], PrimeOmega[#] == 3 && PrimeNu[#] < 3 &] (* Giovanni Resta, Apr 20 2017 *)
PROG
(PARI)
isA285508(n) = ((omega(n) < 3) && (bigomega(n) == 3));
n=0; k=1; while(k <= 10000, n=n+1; if(isA285508(n), write("b285508.txt", k, " ", n); k=k+1));
\\ Antti Karttunen, Apr 20 2017
(Scheme, with my IntSeq-library) (define A285508 (MATCHING-POS 1 1 (lambda (n) (and (= 3 (A001222 n)) (< (A001221 n) 3))))) ;; Antti Karttunen, Apr 20 2017
(Python)
from sympy import primefactors, primeomega
def omega(n): return len(primefactors(n))
def bigomega(n): return primeomega(n)
print([n for n in range(1, 501) if omega(n)<3 and bigomega(n) == 3]) # Indranil Ghosh, Apr 20 2017 and Kalle Siukola, Oct 25 2023
(Python)
from math import isqrt
from sympy import primepi, primerange, integer_nthroot
def A285508(n):
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
def f(x): return int(n+x-sum(primepi(x//(k**2))-(a<<1)+primepi(isqrt(x//k))-1 for a, k in enumerate(primerange(integer_nthroot(x, 3)[0]+1))))
return bisection(f, n, n) # Chai Wah Wu, Oct 20 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Kalle Siukola, Apr 20 2017
STATUS
approved