OFFSET
1,4
FORMULA
a(n)=Min{x; composite[x]-x=n}
MATHEMATICA
f[x_] := FixedPoint[x+PrimePi[ # ]+1&, x] t=Table[0, {100}]; Do[s=f[n]-n; If[s<101&&t[[s]]==0, t[[s]]=n], {n, 1, 10000}]; t
Join[{0, 0}, Table[Prime[n-1]-n+1, {n, 3, 70}]] (* Harvey P. Dale, Dec 18 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jul 19 2002
EXTENSIONS
Simpler description from Vladeta Jovovic, Mar 29 2003
Definition corrected by Harvey P. Dale, Dec 18 2012
STATUS
approved