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.

Showing 1-3 of 3 results.

A046315 Odd semiprimes: odd numbers divisible by exactly 2 primes (counted with multiplicity).

Original entry on oeis.org

9, 15, 21, 25, 33, 35, 39, 49, 51, 55, 57, 65, 69, 77, 85, 87, 91, 93, 95, 111, 115, 119, 121, 123, 129, 133, 141, 143, 145, 155, 159, 161, 169, 177, 183, 185, 187, 201, 203, 205, 209, 213, 215, 217, 219, 221, 235, 237, 247, 249, 253, 259, 265, 267, 287, 289
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Comments

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

Examples

			From _K. D. Bajpai_, Jul 05 2014: (Start)
15 is a term because it is an odd number and 15 = 3 * 5, which is semiprime.
39 is a term because it is an odd number and 39 = 3 * 13, which is semiprime. (End)
		

Crossrefs

Odd members of A001358.
A046388 is a subsequence.
Cf. A085770 (number of odd semiprimes < 10^n). - Robert G. Wilson v, Aug 25 2011

Programs

  • Haskell
    a046315 n = a046315_list !! (n-1)
    a046315_list = filter odd a001358_list  -- Reinhard Zumkeller, Jan 02 2014
    
  • Maple
    A046315 := proc(n) option remember; local r;
       if n = 1 then RETURN(9) fi;
       for r from procname(n - 1) + 2 by 2 do
          if numtheory[bigomega](r) = 2 then
             RETURN(r)
          end if
       end do
    end proc:
    seq(A046315(n),n=1..56); # Peter Luschny, Feb 15 2011
  • Mathematica
    Reap[Do[If[Total[FactorInteger[n]][[2]] == 2, Sow[n]], {n, 1, 400, 2}]][[2,1]] (* Zak Seidov *)
    fQ[n_] := Plus @@ Last /@ FactorInteger@ n == 2; Select[2 Range@ 150 - 1, fQ] (* Robert G. Wilson v, Feb 15 2011 *)
    Select[Range[5,301,2],PrimeOmega[#]==2&] (* Harvey P. Dale, May 22 2015 *)
  • 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
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A046315(n):
        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)))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Aug 17 2024

Formula

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

A220262 Number of even semiprimes < 10^n. Number of terms of A100484 < 10^n.

Original entry on oeis.org

0, 3, 15, 95, 669, 5133, 41538, 348513, 3001134, 26355867, 234954223, 2119654578, 19308136142, 177291661649, 1638923764567, 15237833654620, 142377417196364, 1336094767763971, 12585956566571620, 118959989688273472, 1127779923790184543, 10720710117789005897
Offset: 0

Views

Author

Robert G. Wilson v, Dec 08 2012

Keywords

Comments

All such semiprimes have the form 2*p, where p is prime. - T. D. Noe, Dec 09 2012

Crossrefs

Programs

  • Mathematica
    Table[PrimePi[10^n/2], {n, 0, 14}]
  • PARI
    a(n)=primepi(10^n\2) \\ Charles R Greathouse IV, Sep 08 2015
    
  • Python
    from sympy import primepi
    def A220262(n): return primepi(10**n>>1) # Chai Wah Wu, Oct 17 2024

Formula

a(n) = A066265(n) - A085770(n) for n > 1.

Extensions

a(15)-a(20) from Hugo Pfoertner, Oct 14 2017
a(21) from Jinyuan Wang, Jul 30 2021

A362042 Number of odd semiprimes less than 2^n.

Original entry on oeis.org

0, 0, 0, 0, 2, 4, 11, 24, 51, 103, 207, 417, 815, 1622, 3164, 6210, 12146, 23711, 46295, 90307, 176369, 344155, 672091, 1312721, 2565048, 5013566, 9804910, 19183069, 37547164, 73526846, 144042323, 282317826, 553564500, 1085869406, 2130916524, 4183381508, 8215884036
Offset: 0

Views

Author

Sidney Cadot, Apr 15 2023

Keywords

Comments

Odd numbers with two prime factors are used as the modulus in the RSA algorithm. This sequence shows the growth of the number of 'candidate' RSA moduli for keys up to a given number of bits.

Examples

			For n=5, there are four integers less than 32 (i.e., 2^5) that are the product of two odd primes: {3*3, 3*5, 3*7, 5*5} = {9, 15, 21, 25}; hence, a(5)=4.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Length@Select[Range[1, 2^n - 1, 2], Total[Last /@ FactorInteger[#]] == 2 &]
    Table[a[n],{n,0,24}]

Formula

a(n) = A125527(n) - A007053(n-1) for n > 0. - Jinyuan Wang, Apr 16 2023

Extensions

More terms from Jinyuan Wang, Apr 16 2023
Showing 1-3 of 3 results.