OFFSET
2,1
COMMENTS
Here the skipping of an interval means that the interval falls strictly between (1+1/n)^(a(n)-1) and (1+1/n)^a(n).
The sequence is not monotonically increasing; a(24) = a(25) and a(62) > a(63) are the first counterexamples.
Asymptotic to n * log(n), and as such also to the prime numbers (A000040).
EXAMPLE
1.1^26 = 11.918... and 1.1^27 = 13.109...; [12,13] is skipped, and this is the first time this happens, thus a(10)=27.
MATHEMATICA
a[n_, m_] := Reduce[(1+1/n)^(m-1) < k < k+1 < (1+1/n)^m, k, Integers];
a[n_] := For[m = 1, True, m++, If[a[n, m] =!= False, Return[m]]];
Table[a[n], {n, 2, 100}] (* Jean-François Alcover, Jul 07 2019 *)
PROG
(PARI) a(n) = my(k=2, last=1+1/n); while(floor(new = (1+1/n)^k) - ceil(last) != 1, k++; last = new); k; \\ Michel Marcus, Mar 30 2019
(Python)
from math import floor, log
def get_a_of_n(i):
x=1+1/i
j=i
while floor(log(j, x))!=floor(log(j+1, x)):
j+=1
return floor(log(j, x))+1
def main():
step=1
i=2
while True:
y=get_a_of_n(i)
print(y, end=", ")
i+=step
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Costea, Mar 27 2019
STATUS
approved