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-5 of 5 results.

A106349 Primes indexed by semiprimes.

Original entry on oeis.org

7, 13, 23, 29, 43, 47, 73, 79, 97, 101, 137, 139, 149, 163, 167, 199, 227, 233, 257, 269, 271, 293, 313, 347, 373, 389, 421, 439, 443, 449, 467, 487, 491, 499, 577, 607, 631, 647, 653, 661, 673, 677, 727, 751, 757, 811, 821, 823, 829, 839, 907, 929, 937, 947
Offset: 1

Views

Author

Jonathan Vos Post, Apr 29 2005

Keywords

Comments

This is the sequence of the k-th prime for k = {4,6,9,10,14,15,21,22,25,26,33,34,35,38,39,46,49,51,...}. Not to be confused with A106350: semiprimes indexed by primes.

Examples

			a(1) = 7 because semiprime(1) = 4, so prime(semiprime(1)) = prime(4) = 7.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n): n in [2..200] | &+[d[2]: d in Factorization(n)] eq 2]; // Vincenzo Librandi, Nov 28 2015
    
  • Mathematica
    Prime@ Select[Range@ 161, PrimeOmega@ # == 2 &] (* or *) Select[Prime@ Range@ 161, PrimeOmega@ PrimePi@ # == 2 &] (* Michael De Vlieger, Nov 28 2015 *)
  • PARI
    lista(nn) = select(x->(bigomega(primepi(x))==2), primes(nn)); \\ Michel Marcus, Nov 29 2015

Formula

a(n) = prime(semiprime(n)).
a(n) = A000040(A001358(n)).
pi(a(n)) = p*q for some primes p and q.
Sum_{n>=1} 1/a(n) is in the interval (0.9910, 0.9915) (Kinlaw et al., 2024, Theorem 6, p. 11). - Amiram Eldar, Nov 09 2024

A106350 Semiprimes indexed by primes.

Original entry on oeis.org

6, 9, 14, 21, 33, 35, 49, 55, 65, 86, 91, 115, 122, 129, 142, 159, 183, 187, 206, 215, 218, 247, 259, 287, 303, 319, 323, 334, 339, 358, 403, 415, 446, 451, 482, 489, 511, 527, 537, 553, 573, 581, 626, 633, 655, 667, 698, 737, 753, 758, 771, 791, 794, 835, 851
Offset: 1

Views

Author

Jonathan Vos Post, Apr 30 2005

Keywords

Comments

This is the sequence of the n-th semiprime for n = {2,3,5,7,11,13,17,19,23,29...}. Not to be confused with A106349: Primes indexed by semiprimes. We seek to know what this sequence is asymptotically, as J. B. Rosser's result, subsequently modified, is that prime(n) ~ n*(log n + log log n - 1). hence semiprime(prime(n)) ~ semiprime(n)*(log semiprime(n) + log log semiprime(n) - 1). But what is, asymptotically, semiprime(n)?
Semiprime(n) ~ n log n / log log n, hence a(n) ~ n log^2 n / log log n. - Charles R Greathouse IV, Dec 28 2011

Examples

			a(1) = semiprime(prime(1)) = semiprime(2) = 6.
a(2) = semiprime(prime(2)) = semiprime(3) = 9.
		

Crossrefs

Programs

  • Maple
    A001358 := proc(n) if n = 1 then 4; else for a from procname(n-1)+1 do if numtheory[bigomega](a) = 2 then return a ; end if; end do ; end if ; end proc: A106350 := proc(n) A001358(ithprime(n)) ; end proc: seq(A106350(n),n=1..80) ; # R. J. Mathar, Dec 14 2009
  • Mathematica
    terms = 55;
    semiPrimes = Select[Range[16 terms], PrimeOmega[#] == 2&];
    (* NB If the index Prime[terms] exceeds the size of the table semiPrimes, then the coefficient 16 has to be increased according to the number of terms desired: for instance, for 1000 terms, replace 16 with 32. *)
    a[n_] := semiPrimes[[Prime[n]]];
    Array[a, terms] (* Jean-François Alcover, Apr 13 2020 *)

Formula

a(n) = semiprime(prime(n)). a(n) = A001358(A000040(n)).
a(n) ~ n log^2 n / log log n. - Charles R Greathouse IV, Dec 28 2011

Extensions

All values after a(32) corrected by R. J. Mathar, Dec 14 2009

A105998 Semiprime function n -> A001358(n) applied four times to n.

Original entry on oeis.org

77, 119, 219, 235, 377, 381, 566, 634, 721, 779, 998, 1006, 1126, 1282, 1294, 1563, 1642, 1745, 1853, 1959, 1961, 2209, 2402, 2483, 2554, 2785, 3005, 3149, 3173, 3242, 3481, 3574, 3587, 3622, 4101, 4282, 4471, 4681, 4714, 4798, 4859, 4882, 5095, 5201
Offset: 1

Views

Author

Jonathan Vos Post, Apr 29 2005

Keywords

Examples

			a(1) = semiprime(semiprime(semiprime(semiprime(1)))) = semiprime(semiprime(semiprime(4))) = semiprime(semiprime(10)) = semiprime(26) = 77.
		

Crossrefs

Programs

  • Maple
    issp:= n-> not isprime(n) and numtheory[bigomega](n)=2:
    sp:= proc(n) option remember; local k; if n=1 then 4 else
           for k from 1+sp(n-1) while not issp(k) do od; k fi end:
    a:= n-> (sp@@4)(n):
    seq(a(n), n=1..44);  # Alois P. Heinz, Aug 16 2024
  • Mathematica
    f[n_] := Plus @@ Flatten[ Table[ # [[2]], {1}] & /@ FactorInteger[ n]]; t = Select[ Range[ 5210], f[ # ] == 2 &]; Table[ Nest[ t[[ # ]] &, n, 4], {n, 45}] (* Robert G. Wilson v, Apr 30 2005 *)
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A105998(n):
        def f(x): return int(x+((t:=primepi(s:=isqrt(x)))*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1)))
        def A001358(n):
            m, k = n, f(n)+n
            while m != k:
                m, k = k, f(k)+n
            return m
        return A001358(A001358(A001358(A001358(n)))) # Chai Wah Wu, Aug 16 2024

Formula

Extensions

More terms from Robert G. Wilson v, Apr 30 2005

A105999 Semiprimeth recurrence: a(0) = 1, a(n+1) = semiprime(a(n)) = A001358(a(n)).

Original entry on oeis.org

1, 4, 10, 26, 77, 235, 779, 2785, 10643, 43697, 192893, 915218, 4657929, 25380749, 147721169, 916036271, 6037442989, 42191467826, 311911160465, 2434014941905, 20007995450483, 172911791611798, 1568190042677867
Offset: 0

Views

Author

Jonathan Vos Post, Apr 29 2005

Keywords

Comments

Semiprime equivalent of R. G. Wilson's primeth recurrence: A007097.

Examples

			a(1) = A001358(1) = 4,
a(2) = A001358(a(1)) = A001358(4) = 10,
a(3) = A001358(a(2)) = A001358(10) = 26.
		

Crossrefs

Programs

  • Mathematica
    SemiPrimePi[n_] := Sum[PrimePi[n/Prime@i] - i + 1, {i, PrimePi@ Sqrt@n}]; SemiPrime[n_] := Block[{e = Floor[Log[2, n] + 1], a, b}, a = 2^e; Do[b = 2^p; While[SemiPrimePi@a < n, a = a + b]; a = a - b/2, {p, e, 0, -1}]; a + b/2]; NestList[SemiPrime@# &, 1, 18] (* Robert G. Wilson v, May 31 2006 *)

Extensions

a(5)-a(15) from Robert G. Wilson v, Apr 30 2005
a(16)-a(20) from Robert G. Wilson v, May 31 2006
a(21)-a(22) from Donovan Johnson, Sep 24 2010

A105346 3-almost primes whose indices are 3-almost primes.

Original entry on oeis.org

42, 52, 76, 92, 116, 117, 125, 174, 182, 186, 212, 230, 266, 275, 282, 285, 316, 318, 325, 385, 406, 410, 423, 428, 436, 455, 470, 474, 507, 508, 534, 575, 604, 605, 618, 627, 654, 657, 670, 678, 682, 705, 710, 730, 754, 762, 772, 788, 834, 861, 903, 931
Offset: 1

Views

Author

Jonathan Vos Post, Apr 30 2005

Keywords

Comments

The n-th 3-almost prime function applied to itself. This is the 3-almost prime equivalent of A091022, the latter being the n-th 2-almost prime function applied to itself. Note that this new iterated 3-almost prime sequence begins with the meaning of "Life, the Universe and Everything" and then generalizes to include the number of playing cards in a deck and the boiling point of water on the Fahrenheit scale.

Examples

			a(1) = 3-almost-prime(3-almost-prime(1)) = 3-almost-prime(8) = 42.
a(2) = 3-almost-prime(3-almost-prime(2)) = 3-almost-prime(12) = 52.
a(3) = 3-almost-prime(3-almost-prime(3)) = 3-almost-prime(18) = 76.
		

Crossrefs

Programs

  • Maple
    isA014612 := proc(n) option remember ; RETURN( numtheory[bigomega](n) = 3) ; end: A014612 := proc(n) option remember ; if n =1 then 8; else for a from procname(n-1)+1 do if isA014612(a) then RETURN(a) ; fi; od; fi; end: for n from 1 to 100 do q := A014612(A014612(n)) ; printf("%d,",q) ; od: # R. J. Mathar, Jan 27 2009
  • Mathematica
    With[{tap=Select[Range[2000],PrimeOmega[#]==3&]},Table[tap[[tap[[n]]]],{n,100}]] (* Harvey P. Dale, May 20 2019 *)
  • PARI
    do(lim)=my(v=List(), t); forprime(p=2, lim\4, forprime(q=2, min(lim\(2*p), p), t=p*q; forprime(r=2, min(lim\t, q), listput(v, t*r)))); v=Set(v); t=setsearch(v,#v); if(!t, t=setsearch(v,#v,1)-1); vector(t,i,v[v[i]]) \\ Charles R Greathouse IV, Feb 05 2017

Formula

a(n) = A014612(A014612(n)).

Extensions

Extended by R. J. Mathar, Jan 27 2009
Showing 1-5 of 5 results.