OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
If n=1, then (p(1)+r(1))/2=(2+0)/2=1=a(1).
If n=10, then (p(10)+r(10))/2=(29+15)/2=22=a(2).
If n=14, then (p(14)+r(14))/2=(43+21)/2=32=a(3).
If n=17, then (p(17)+r(17))/2=(59+25)/2=42=a(4).
If n=23, then (p(23)+r(23))/2=(83+33)/2=58=a(5), etc.
MAPLE
From R. J. Mathar, Apr 28 2010: (Start)
A141468 := proc(n) option remember; if n <= 2 then n-1; else for a from procname(n-1)+1 do if not isprime(a) then return a; end if; end do; end if; end proc:
for n from 1 to 300 do c := (ithprime(n)+A141468(n))/2 ; if type(c, 'integer') then if not isprime(c) then printf("%d, ", c) ; end if; end if; end do: (End)
MATHEMATICA
Module[{nn=1500, pr, np, len}, pr=Prime[Range[PrimePi[nn]]]; np=Complement[ Range[ 0, nn], pr]; len=Min[Length[pr], Length[np]]; Select[Total[#]/2&/@Thread[{Take[pr, len], Take[np, len]}], IntegerQ[#]&&!PrimeQ[#]&]] (* Harvey P. Dale, Jul 28 2014 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Sep 19 2008
EXTENSIONS
Corrected (119 inserted, 239 removed etc.) by R. J. Mathar, Apr 28 2010
STATUS
approved