login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Smallest power to which 1+1/n must be raised in order for an interval [k,k+1], with k an integer, to be skipped.
0

%I #34 Oct 18 2024 17:59:04

%S 4,7,9,13,15,18,22,26,27,32,33,40,42,48,51,55,58,62,66,71,75,80,85,85,

%T 91,97,103,105,111,112,120,121,129,131,139,142,143,153,156,158,168,

%U 172,175,178,181,193,197,201,206,210,215,220,225,230,235,241,246,252

%N Smallest power to which 1+1/n must be raised in order for an interval [k,k+1], with k an integer, to be skipped.

%C 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).

%C The sequence is not monotonically increasing; a(24) = a(25) and a(62) > a(63) are the first counterexamples.

%C Asymptotic to n * log(n), and as such also to the prime numbers (A000040).

%e 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.

%t a[n_, m_] := Reduce[(1+1/n)^(m-1) < k < k+1 < (1+1/n)^m, k, Integers];

%t a[n_] := For[m = 1, True, m++, If[a[n, m] =!= False, Return[m]]];

%t Table[a[n], {n, 2, 100}] (* _Jean-François Alcover_, Jul 07 2019 *)

%o (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

%o (Python)

%o from math import floor, log

%o def get_a_of_n(i):

%o x=1+1/i

%o j=i

%o while floor(log(j, x))!=floor(log(j+1, x)):

%o j+=1

%o return floor(log(j, x))+1

%o def main():

%o step=1

%o i=2

%o while True:

%o y=get_a_of_n(i)

%o print(y, end=", ")

%o i+=step

%Y Cf. A031435.

%K nonn

%O 2,1

%A _Alex Costea_, Mar 27 2019