login
A133796
a(n) = n-th prime + n-th semiprime.
1
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,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000 (first 1000 terms from Harvey P. Dale)
FORMULA
a(n) = A000040(n) + A001358(n).
EXAMPLE
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.
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 *)
PROG
(PARI) A133796(n)=prime(n)+A001358(n) \\ M. F. Hasler, Apr 24 2019
CROSSREFS
Sequence in context: A315982 A315983 A315984 * A315985 A129413 A315986
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Jan 05 2008
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
STATUS
approved