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-8 of 8 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

A105997 Semiprime function n -> A001358(n) applied three times to n.

Original entry on oeis.org

26, 39, 74, 77, 118, 119, 178, 194, 219, 235, 299, 301, 329, 377, 381, 454, 471, 502, 535, 565, 566, 634, 679, 703, 721, 779, 842, 886, 893, 914, 973, 995, 998, 1006, 1126, 1174, 1227, 1282, 1294, 1317, 1337, 1343, 1389, 1418, 1457, 1563, 1577, 1623, 1642
Offset: 1

Views

Author

Jonathan Vos Post, Apr 29 2005

Keywords

Examples

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

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@@3)(n):
    seq(a(n), n=1..49);  # Alois P. Heinz, Aug 16 2024
  • Mathematica
    f[n_] := Plus @@ Flatten[ Table[ # [[2]], {1}] & /@ FactorInteger[ n]]; t = Select[ Range[ 1700], f[ # ] == 2 &]; Table[ Nest[ t[[ # ]] &, n, 3], {n, 50}] (* Robert G. Wilson v, Apr 30 2005 *)
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A105997(n):
        def f(x,n): return int(n+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(n))) # Chai Wah Wu, Aug 16 2024

Formula

a(n) = A001358(A001358(A001358(n))).

Extensions

Corrected and extended by Robert G. Wilson v, Apr 30 2005

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

A176654 Numbers k such that both semiprime(k)/p and semiprime(semiprime(k))/p are prime for some prime p.

Original entry on oeis.org

1, 2, 4, 5, 6, 8, 14, 20, 21, 22, 24, 27, 28, 42, 43, 47, 52, 58, 62, 64, 65, 66, 70, 73, 75, 82, 87, 92, 97, 105, 109, 111, 116, 129, 130, 133, 135, 147, 149, 150, 161, 170, 171, 172, 189, 191, 195, 208, 220, 222, 224, 227, 241, 246, 267, 274, 276, 277, 281, 287
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 22 2010

Keywords

Comments

Indices n such that A001358(n) and A091022(n) share at least one prime factor. - R. J. Mathar, Apr 26 2010

Examples

			1 is a term because both semiprime(1)/2 = 4/2 = 2 and semiprime(semiprime(1))/2 = 10/2 = 5 are prime;
2 is a term because both semiprime(2)/3 = 6/3 = 2 and semiprime(semiprime(2))/3 = 15/3 = 5 are prime;
4 is a term because both semiprime(4)/2 = 10/2 = 5 and semiprime(semiprime(4))/2 = 26/2 = 13 are prime.
		

Crossrefs

Programs

  • Maple
    A091022 := proc(n) A001358(A001358(n)) ; end proc: seq(A091022(n),n=1..20) ; isA176654 := proc(n) pfsn := convert(numtheory[factorset]( A001358(n) ),list) ; pfsn1 := convert(numtheory[factorset]( A091022(n) ),list) ; op(1,pfsn) = op(1,pfsn1) or op(1,pfsn) = op(-1,pfsn1) or op(-1,pfsn) = op(1,pfsn1) or op(-1,pfsn) = op(-1,pfsn1) ; end proc: for n from 1 to 1600 do if isA176654(n) then printf("%d,",n) ; end if; end do: # R. J. Mathar, Apr 26 2010

Extensions

Most values after a(6) replaced by R. J. Mathar, Apr 26 2010

A176658 Numbers k such that semiprime(semiprime(k)) + 1 = semiprime(semiprime(k+1)).

Original entry on oeis.org

3, 5, 11, 14, 20, 32, 52, 57, 70, 72, 81, 95, 114, 124, 231, 240, 273, 276, 287, 291, 371, 380, 441, 507, 528, 544, 573, 607, 629, 647, 672, 695, 716, 739, 828, 830, 832, 873, 1002, 1035, 1037, 1044, 1100, 1104, 1182, 1208, 1236, 1278, 1321, 1340, 1367, 1522
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 23 2010

Keywords

Comments

Numbers k such that A001358(A001358(k)) + 1 = A001358(A001358(k+1)).
Numbers k such that A091022(k) + 1 = A091022(k+1).

Examples

			3 is a term because semiprime(semiprime(3)) + 1 = 25 + 1 = semiprime(semiprime(3+1)).
		

Crossrefs

Programs

Extensions

Corrected (72 inserted, 85 replaced by 95, 124 inserted) and extended by R. J. Mathar, Apr 26 2010
Showing 1-8 of 8 results.