OFFSET
1,3
COMMENTS
a(n) is the largest power to which the fraction prime(n+1)/prime(n) can be raised without yielding a result which is greater than 2. It has been proved that lim inf of this sequence is (positive) infinity; e.g., the ratio between subsequent primes tends to 1.
FORMULA
a(n) = floor(1 / log_2(prime(n+1) / prime(n))).
EXAMPLE
a(5) = 4 because the sixth prime, 13, divided by the fifth prime, 11, has base-two logarithm 0.241008... and this lies between 1/4 and 1/5.
MATHEMATICA
f[n_] := Floor[1/Log[2, Prime[n + 1]/Prime[n]]]
PROG
(PARI) a(n) = log(2)\log(prime(n+1) / prime(n)); \\ Michel Marcus, Apr 14 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jack W Grahl, Jul 07 2007
EXTENSIONS
Edited by Jon E. Schoenfield, Apr 13 2021
STATUS
approved