OFFSET
1,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
M. D. Hirschhorn, How unexpected is the prime number theorem?, Amer. Math. Monthly, 80 (1973), 675-677.
M. D. Hirschhorn, How unexpected is the prime number theorem?, Amer. Math. Monthly, 80 (1973), 675-677. [Annotated scanned copy]
R. C. Vaughan, The problime number theorem, Bull. London Math. Soc., 6 (1974), 337-340.
MAPLE
b:= proc(n) option remember; local k;
if n=1 then c(2):= 1; 2
else k:= ceil(b(n-1) +1/mul((1-1/b(j)), j=1..n-1));
c(k):= n; k
fi
end:
a:= proc(n) option remember; local k;
if n=1 then b(1)
else for k from c(a(n-1))+1 while not isprime(b(k))
do od; b(k)
fi
end:
seq(a(n), n=1..50); # Alois P. Heinz, Dec 29 2010
MATHEMATICA
nmax = 400;
b[n_] := b[n] = If[n==1, 2, Ceiling[b[n-1]+1/Product[1-1/b[j], {j, 1, n-1}]]];
Intersection[Array[b, nmax], Prime[Range[PrimePi[b[nmax]]]]] (* Jean-François Alcover, Nov 20 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jonathan Vos Post, Dec 29 2010
EXTENSIONS
More terms from Alois P. Heinz, Dec 29 2010
STATUS
approved