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 A046315 #70 Aug 17 2024 01:34:20 %S A046315 9,15,21,25,33,35,39,49,51,55,57,65,69,77,85,87,91,93,95,111,115,119, %T A046315 121,123,129,133,141,143,145,155,159,161,169,177,183,185,187,201,203, %U A046315 205,209,213,215,217,219,221,235,237,247,249,253,259,265,267,287,289 %N A046315 Odd semiprimes: odd numbers divisible by exactly 2 primes (counted with multiplicity). %C A046315 In general, the prime factors, p, of a(n) are given by: p = sqrt(a(n) + (k/2)^2) +- (k/2) where k is the positive difference of the prime factors. Equivalently, p = (1/2)( sqrt(4a(n) + k^2) +- k ). - _Wesley Ivan Hurt_, Jun 28 2013 %H A046315 Zak Seidov and K. D. Bajpai, <a href="/A046315/b046315.txt">Table of n, a(n) for n = 1..10000</a> (first 1956 terms from Zak Seidov) %F A046315 Sum_{n>=1} 1/a(n)^s = (1/2)*(P(s)^2 + P(2*s)) - P(s)/2^s, for s>1, where P is the prime zeta function. - _Amiram Eldar_, Nov 21 2020 %e A046315 From _K. D. Bajpai_, Jul 05 2014: (Start) %e A046315 15 is a term because it is an odd number and 15 = 3 * 5, which is semiprime. %e A046315 39 is a term because it is an odd number and 39 = 3 * 13, which is semiprime. (End) %p A046315 A046315 := proc(n) option remember; local r; %p A046315 if n = 1 then RETURN(9) fi; %p A046315 for r from procname(n - 1) + 2 by 2 do %p A046315 if numtheory[bigomega](r) = 2 then %p A046315 RETURN(r) %p A046315 end if %p A046315 end do %p A046315 end proc: %p A046315 seq(A046315(n),n=1..56); # _Peter Luschny_, Feb 15 2011 %t A046315 Reap[Do[If[Total[FactorInteger[n]][[2]] == 2, Sow[n]], {n, 1, 400, 2}]][[2,1]] (* _Zak Seidov_ *) %t A046315 fQ[n_] := Plus @@ Last /@ FactorInteger@ n == 2; Select[2 Range@ 150 - 1, fQ] (* _Robert G. Wilson v_, Feb 15 2011 *) %t A046315 Select[Range[5,301,2],PrimeOmega[#]==2&] (* _Harvey P. Dale_, May 22 2015 *) %o A046315 (PARI) list(lim)=my(u=primes(primepi(lim\3)),v=List(),t); for(i=2,#u, for(j=i,#u, t=u[i]*u[j];if(t>lim,break); listput(v,t))); vecsort(Vec(v)) \\ _Charles R Greathouse IV_, Jul 19 2011 %o A046315 (Haskell) %o A046315 a046315 n = a046315_list !! (n-1) %o A046315 a046315_list = filter odd a001358_list -- _Reinhard Zumkeller_, Jan 02 2014 %o A046315 (Python) %o A046315 from math import isqrt %o A046315 from sympy import primepi, primerange %o A046315 def A046315(n): %o A046315 def f(x): return int(n+x+((t:=primepi(s:=isqrt(x)))*(t-1)>>1)-sum(primepi(x//k) for k in primerange(3, s+1))) %o A046315 m, k = n, f(n) %o A046315 while m != k: %o A046315 m, k = k, f(k) %o A046315 return m # _Chai Wah Wu_, Aug 17 2024 %Y A046315 Odd members of A001358. %Y A046315 A046388 is a subsequence. %Y A046315 Cf. A085770 (number of odd semiprimes < 10^n). - _Robert G. Wilson v_, Aug 25 2011 %K A046315 nonn %O A046315 1,1 %A A046315 _Patrick De Geest_, Jun 15 1998