OFFSET
1,1
COMMENTS
a(n) = prime(n) for n = 1, 2, 3, 4, 5, 13, 14, ...
If a(n) = 1 and a(n+1) > 1, then prime(n) < a(n+1) <= prime(n+1).
Conjecture: a(n) > 1 for every n. - Thomas Ordowski, Aug 08 2017
Indeed, a(n) > n for all n <= 460. - Robert Israel, Aug 08 2017
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..1000
MAPLE
A[1]:= 2: P:= 2:
for n from 2 to 200 do
for k from ithprime(n) by -1 do
if isprime(1+P*k) then A[n]:= k; P:= P*k; break fi
od;
od:
seq(A[i], i=1..200); # Robert Israel, Aug 08 2017
MATHEMATICA
a[1] = 2; a[n_] := a[n] = Module[{k = Prime[n], r = Product[a[i], {i, 1, n - 1}]}, While[! PrimeQ[1 + k*r], k--]; k]; Array[a, 100] (* Amiram Eldar, Jan 19 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Thomas Ordowski, Aug 08 2017
EXTENSIONS
More terms from Robert Israel, Aug 08 2017
STATUS
approved