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.

A133796 a(n) = n-th prime + n-th semiprime.

Original entry on oeis.org

6, 9, 14, 17, 25, 28, 38, 41, 48, 55, 64, 71, 76, 81, 86, 99, 108, 112, 122, 128, 131, 141, 148, 158, 171, 178, 185, 192, 195, 200, 218, 224, 231, 234, 255, 262, 272, 281, 286, 294, 301, 304, 320, 326, 331, 340, 353, 366, 372, 375, 388, 397, 400, 412, 423, 432
Offset: 1

Views

Author

Jonathan Vos Post, Jan 05 2008

Keywords

Examples

			a(1) = 1st prime + 1st semiprime = 2 + 4 = 6.
a(2) = 2nd prime + 2nd semiprime = 3 + 6 = 9.
a(3) = 3rd prime + 3rd semiprime = 5 + 9 = 14.
		

Crossrefs

Programs

  • Maple
    A000040 := proc(n) ithprime(n) ; end: A001358 := proc(n) option remember ; local a ; if n = 1 then 4 ; else for a from A001358(n-1)+1 do if numtheory[bigomega](a) = 2 then RETURN(a) ; fi ; od: fi ; end: A133796 := proc(n) A000040(n)+A001358(n) ; end: seq(A133796(n),n=1..100) ; # R. J. Mathar, Jan 07 2008
  • 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]; f[n_] := Prime@n + SemiPrime@n; Array[f, 56] (* Robert G. Wilson v *)
    Module[{nn=300,pr,semi,len},pr=Prime[Range[PrimePi[nn]]];semi=Select[ Range[ nn], PrimeOmega[#]==2&];len=Min[Length[pr],Length[semi]];Total/@ Thread[{Take[pr,len],Take[semi,len]}]] (* Harvey P. Dale, Jun 27 2014 *)
  • PARI
    A133796(n)=prime(n)+A001358(n) \\ M. F. Hasler, Apr 24 2019

Formula

a(n) = A000040(n) + A001358(n).

Extensions

Corrected and extended by Robert G. Wilson v and R. J. Mathar, Jan 05 2008
Typo in first Mma program corrected by Giovanni Resta, Jun 12 2016