A307175 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.
4, 7, 9, 13, 15, 18, 22, 26, 27, 32, 33, 40, 42, 48, 51, 55, 58, 62, 66, 71, 75, 80, 85, 85, 91, 97, 103, 105, 111, 112, 120, 121, 129, 131, 139, 142, 143, 153, 156, 158, 168, 172, 175, 178, 181, 193, 197, 201, 206, 210, 215, 220, 225, 230, 235, 241, 246, 252
Offset: 2
Keywords
Examples
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.
Crossrefs
Cf. A031435.
Programs
-
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 *)
-
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
Comments