OFFSET
1,9
FORMULA
If n>1, then a(n) = floor((n+1)/2) - primepi(n) + 1, where primepi denotes the number of primes <= n a(n)/n is convergent against 0.5. - Stefan Steinerberger, May 09 2006
MATHEMATICA
Insert[Table[Floor[(n + 1)/2] - PrimePi[n] + 1, {n, 2, 80}], 1, 1] (* Stefan Steinerberger, May 09 2006 *)
nn=101; With[{nps=Complement[Range[1, nn, 2], Prime[Range[PrimePi[nn]]]]}, Table[Count[nps, _?(#<=n&)], {n, nn}]] (* Harvey P. Dale, Mar 23 2011 *)
Accumulate[Table[If[OddQ[n]&&!PrimeQ[n], 1, 0], {n, 100}]] (* Harvey P. Dale, Jan 16 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Stefan Steinerberger, May 09 2006
STATUS
approved