OFFSET
1,1
COMMENTS
Every term has the form p*2^k, where p>=2 is prime and k>=0 (see A093641). For example, for a(3)=4, p=2, k=1. The sequence contains infinitely many primes and, therefore, limsup a(n)/(n*log(n))=1.
What is liminf a(n)/(n*log(n))?
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
Let, for n>=3, a(k) <= a(n)/2 < a(k+1). Then a(n+1) = 2*a(k+1) if prime(n+1) > 2*a_(k+1), otherwise, a(n+1) = prime(n+1).
EXAMPLE
For n=6, a(4)=6<a(5)=8, i.e., k+1=5 and a(k+1)=8. Since prime(7)=17>2*a(5)=16, then a(7)=2*a(6)=16.
Further, for n=7, k+1=6: a(6)=12. Since prime(8)=19<2*a(6)=24, then a(8)=19.
MATHEMATICA
v = Prime[Range[100]]; v[[3]] = 4; k = 1;
For[n = 4, n <= Length[v], n++, While[v[[k+1]] <= v[[n-1]]/2, k++]; v[[n]] = Min[2*v[[k+1]], v[[n]]]];
v (* Jean-François Alcover, May 21 2022, after Charles R Greathouse IV *)
PROG
(PARI) v=primes(100); v[3]=4; k=1; for(n=4, #v, while(v[k+1]<=v[n-1]/2, k++); v[n]=min(2*v[k+1], v[n])); v \\ Charles R Greathouse IV, Oct 11 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Shevelev, Oct 11 2012
STATUS
approved