OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..2000
EXAMPLE
p(8)=19, c(8)=15, average=17, corresponds to 3rd term.
MATHEMATICA
c[x_] := FixedPoint[x+PrimePi[ # ]+1&, x] Do[s=(Prime[n]+c[n])/2; If[IntegerQ[s], Print[s]], {n, 1, 256}]
Module[{nn=200, pr, cm, len}, pr=Prime[Range[nn]]; cm=Select[Range[ nn], CompositeQ]; len=Min[Length[pr], Length[cm]]; Select[Total[#]/2&/@ Thread[ {Take[pr, len], Take[cm, len]}], IntegerQ]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 29 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jul 31 2002
STATUS
approved