login
a(n) = least integer k>=0 such that n = floor((5^j)/(2^k)) for some integer j>=0.
2

%I #7 Mar 14 2024 17:02:17

%S 0,1,3,7,0,2,4,34,6,43,15,1,38,17,3,47,33,19,5,56,42,28,14,7,0,51,37,

%T 30,16,9,2,60,46,39,32,25,18,11,4,62,55,48,41,34,27,20,13,6,71,64,57,

%U 50,115,43,36,29,94,22,15,80,8,1,66,59,124,52,45,110,38,103,31,24,89,17,82

%N a(n) = least integer k>=0 such that n = floor((5^j)/(2^k)) for some integer j>=0.

%C Every nonnegative integer occurs infinitely many times. The j-sequence is A124911.

%H Robert Israel, <a href="/A124919/b124919.txt">Table of n, a(n) for n = 1..10000</a>

%e 1=[5^0/2^0], 2=[5^1/2^1], 3=[5^2/2^3], 4=[5^4/2^7], ...,

%e so j-sequence=(0,1,2,4,...); k-sequence=(0,1,3,7,...).

%p N:= 100: # for a(1) .. a(N)

%p V:=Vector(N,-1): count:= 0:

%p for j from 0 while count < N do

%p x:= 5^j;

%p k0:= max(0, floor(log[2](x/N)));

%p x:= x/2^(k0-1);

%p for k from k0 do

%p x:= x/2;

%p if x < 1 then break fi;

%p m:= floor(x);

%p if m <= N and V[m] = -1 then V[m]:= k; count:= count+1 fi

%p od od:

%p convert(V, list); # _Robert Israel_, Mar 14 2024

%Y Cf. A124911.

%K nonn

%O 1,3

%A _Clark Kimberling_, Nov 13 2006