login
A179644
Product of the 4th power of a prime and 2 different distinct primes (p^4*q*r).
16
240, 336, 528, 560, 624, 810, 816, 880, 912, 1040, 1104, 1134, 1232, 1360, 1392, 1456, 1488, 1520, 1776, 1782, 1840, 1904, 1968, 2064, 2106, 2128, 2256, 2288, 2320, 2480, 2544, 2576, 2754, 2832, 2835, 2928, 2960, 2992, 3078, 3216, 3248, 3280, 3344, 3408
OFFSET
1,1
EXAMPLE
240=2^4*3*5,336=2^4*3*7,..810=2^3^4*5,..
MATHEMATICA
f[n_]:=Sort[Last/@FactorInteger[n]]=={1, 1, 4}; Select[Range[4000], f]
Take[Union[#[[1]]^4 #[[2]]#[[3]]&/@(Flatten[Permutations/@ Subsets[ Prime[ Range[ 20]], {3}], 1])], 50] (* Harvey P. Dale, Feb 07 2013 *)
PROG
(PARI) list(lim)=my(v=List(), t); forprime(p=2, (lim\6)^(1/4), forprime(q=2, sqrt(lim\p^4), if(p==q, next); t=p^4*q; forprime(r=q+1, lim\t, if(p==r, next); listput(v, t*r)))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Jul 19 2011
(Python)
from math import isqrt
from sympy import primepi, primerange, integer_nthroot
def A179644(n):
def bisection(f, kmin=0, kmax=1):
while f(kmax) > kmax: kmax <<= 1
kmin = 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 n+x+sum((t:=primepi(s:=isqrt(y:=x//r**4)))+(t*(t-1)>>1)-sum(primepi(y//k) for k in primerange(1, s+1)) for r in primerange(integer_nthroot(x, 4)[0]+1))+sum(primepi(x//p**5) for p in primerange(integer_nthroot(x, 5)[0]+1))-primepi(integer_nthroot(x, 6)[0])
return bisection(f, n, n) # Chai Wah Wu, Mar 27 2025
KEYWORD
nonn
AUTHOR
STATUS
approved