OFFSET
1,1
COMMENTS
It appears that A113117 and this sequence agree except for the 5th term.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = 2 * (largest prime <= a(n-1)), by Bertrand's postulate.
EXAMPLE
The greatest prime <= a(4) (= 10) is 7. The smallest multiple of 7 which is > 10 is 14. So a(5)= 14.
MATHEMATICA
sim[n_]:=Module[{pr=If[PrimeQ[n], n, NextPrime[n, -1]]}, pr*( Floor[ n/pr]+1)]; NestList[ sim, 2, 40] (* Harvey P. Dale, Sep 07 2012 *)
PROG
(PARI) {m=33; print1(a=2, ", "); for(n=2, m, p=precprime(a); k=a+1; while(k%p>0, k++); print1(a=k, ", "))} - (Brockhaus)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jan 03 2006
EXTENSIONS
a(8) to a(33) from Klaus Brockhaus, Jan 07 2006
STATUS
approved