OFFSET
1,1
COMMENTS
Conjecture: a(n+1) > a(n).
The conjecture holds for the first 2^32.5 =~ 6074001000 terms as all prime gaps up to 2^64 are known. - Charles R Greathouse IV, Apr 27 2023
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..10000
FORMULA
For n > 5, a(n) < n*(n-1)/2. I believe a(n) > n^2/2 + o(n^1.05) asymptotically (Baker, Harman & Pintz). - Charles R Greathouse IV, Apr 27 2023
EXAMPLE
a(2) is the largest prime <= a(1) + 1 = 3. a(2) = 3.
a(3) is the largest prime <= a(2) + 2 = 5. a(3) = 5.
a(4) is the largest prime <= a(3) + 3 = 8. a(4) = 7.
MATHEMATICA
A362527list[nmax_]:=Module[{n=2}, NestList[NextPrime[#+n++, -1]&, 2, nmax-1]]; A362527list[100] (* Paolo Xausa, Aug 29 2023 *)
PROG
(Python)
from sympy import prevprime; L = [2]
for _ in range(55): a = prevprime(L[-1] + len(L) + 1); L.append(a)
print(*L, sep = ", ")
(PARI) first(n)=my(v=vector(n)); v[1]=2; for(k=1, n-1, v[k+1]=precprime(v[k]+k)); v \\ Charles R Greathouse IV, Apr 27 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Ya-Ping Lu, Apr 23 2023
STATUS
approved