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.
%I A297401 #55 Feb 21 2025 16:44:42 %S A297401 24,40,54,56,88,104,128,135,136,152,184,189,232,248,250,296,297,328, %T A297401 344,351,375,376,424,459,472,488,513,536,568,584,621,632,664,686,712, %U A297401 776,783,808,824,837,856,872,875,904,999,1016,1029,1048,1096,1107,1112,1161,1192 %N A297401 Non-sphenic numbers with exactly 8 divisors. %C A297401 These are the numbers of the form p^3*q (with primes p and q distinct) or p^7. Thus it is the union of A065036 and A092759, and this can be used for direct enumeration. - _Alex Meiburg_, Dec 31 2017 %H A297401 Robert Israel, <a href="/A297401/b297401.txt">Table of n, a(n) for n = 1..10000</a> %H A297401 Chris K. Caldwell and G. L. Honaker, Jr., <a href="https://t5k.org/curios/page.php?curio_id=31757">Prime Curios!</a> %H A297401 Wikipedia, <a href="https://en.wikipedia.org/wiki/Sphenic_number">Sphenic number</a> %F A297401 Equals {A030626} \ {A007304}. - _Omar E. Pol_, Dec 30 2017 %p A297401 N:= 1000: # to get all terms <= N %p A297401 P:= select(isprime, [2,seq(i,i=3..N)]): %p A297401 R:= NULL: %p A297401 for p in P do %p A297401 if p^7 <= N then R:= R, p^7 fi; %p A297401 if p^3 > N then break fi; %p A297401 for q in P while p^3*q <= N do if q <> p then R:= R, p^3*q fi od: %p A297401 od: %p A297401 sort([R]); # _Robert Israel_, Dec 31 2017 %t A297401 Select[Range@ 1200, And[DivisorSigma[0, #] == 8, Nand[PrimeNu[#] == 3, PrimeOmega[#] == 3]] &] (* _Michael De Vlieger_, Dec 29 2017 *) %o A297401 (PARI) isok(n) = !((bigomega(n)==3) && (omega(n)==3)) && (numdiv(n) == 8); \\ _Michel Marcus_, Dec 29 2017 %o A297401 (Python) %o A297401 from sympy import primepi, primerange, integer_nthroot %o A297401 def A297401(n): %o A297401 def bisection(f,kmin=0,kmax=1): %o A297401 while f(kmax) > kmax: kmax <<= 1 %o A297401 kmin = kmax >> 1 %o A297401 while kmax-kmin > 1: %o A297401 kmid = kmax+kmin>>1 %o A297401 if f(kmid) <= kmid: %o A297401 kmax = kmid %o A297401 else: %o A297401 kmin = kmid %o A297401 return kmax %o A297401 def f(x): return int(n+x-sum(primepi(x//p**3) for p in primerange(integer_nthroot(x,3)[0]+1))+primepi(integer_nthroot(x,4)[0])-primepi(integer_nthroot(x,7)[0])) %o A297401 return bisection(f,n,n) # _Chai Wah Wu_, Feb 21 2025 %Y A297401 Subsequence of A030626. %Y A297401 Cf. A000005, A030626, A065036, A092759. %K A297401 nonn %O A297401 1,1 %A A297401 _G. L. Honaker, Jr._, Dec 29 2017 %E A297401 More terms from _Michel Marcus_, Dec 29 2017