OFFSET
1,16
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
nextcomp:= proc(x) if isprime(x+1) then x+2 else x+1 fi end proc:
p:= 2; c:= 4: A[1]:= 0:
for n from 2 to 200 do
p:= nextprime(p); c:= nextcomp(c);
A[n]:= floor(p/c);
od:
seq(A[i], i=1..200); # Robert Israel, Sep 28 2016
MATHEMATICA
Composite[n_] := FixedPoint[n + PrimePi[#] + 1&, n + PrimePi[n] + 1];
a[n_] := Floor[Prime[n]/Composite[n]];
Module[{nn=200, cmps}, cmps=Select[Range[nn], CompositeQ]; Floor[#[[1]]/ #[[2]]]&/@ Thread[{Prime[Range[Length[cmps]]], cmps}]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 21 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Aug 02 2002
STATUS
approved