login
A166160
a(n) = (n-th odd prime + n-th odd nonprime)/2 - 1.
1
1, 6, 10, 15, 18, 21, 25, 28, 33, 37, 42, 45, 48, 51, 57, 61, 64, 70, 73, 76, 81, 84, 89, 94, 97, 100, 105, 109, 113, 121, 124, 128, 130, 136, 139, 144, 148, 153, 157, 161, 163, 171, 173, 177, 179, 187, 195, 198, 201, 204, 210, 212, 218, 222, 228, 234, 236, 240, 243
OFFSET
1,2
LINKS
FORMULA
a(n) = A005097(n) + A047845(n), where A005097 U A047845 = A001477.
a(n) = (A065091(n) + A014076(n))/2 - 1.
MAPLE
A065091 := proc(n) ithprime(n+1) ; end proc:
A014076 := proc(n) if n = 1 then 1; else for a from procname(n-1)+2 by 2 do if not isprime(a) then return a ; end if; end do: end if; end proc:
A166160 := proc(n) (A065091(n)+A014076(n))/2-1 ; end proc: seq(A166160(n), n=1..120) ; # R. J. Mathar, May 21 2010
MATHEMATICA
A014076 := Select[Range@250, ! PrimeQ@# && OddQ@# &]; A166160 := Prime[Range[2, 150]]; Table[(A166160[[n]] + A014076[[n]])/2 - 1, {n, 1, 50}] (* G. C. Greubel, Sep 17 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Entries checked by R. J. Mathar, May 21 2010
STATUS
approved