A073047 Least k such that x(k)=0 where x(1)=n and x(k)=k*floor(x(k-1)/k).
2, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16
Offset: 1
Examples
If x(1)=4, x(2)= 2*floor(4/2)=4, x(3)=3*floor(4/3)=3; x(4)=4*floor(3/4)=0 hence a(4)=4.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
f:= proc(n,k) option remember; if n = 0 then return k-1 fi; procname(k*floor(n/k),k+1) end proc: map(f, [$1..100], 1); # Robert Israel, Jul 25 2019
-
Mathematica
a[n_] := Module[{x}, x[1] = n; x[k_] := x[k] = k Floor[x[k-1]/k]; For[k = 1, True, k++, If[x[k] == 0, Return[k]]]]; Array[a, 100] (* Jean-François Alcover, Jun 07 2020 *)
-
PARI
a(n)=if(n<0,0,s=n; c=1; while(s-s%c>0,s=s-s%c; c++); c)
Formula
Presumably a(n) = sqrt(Pi*n)+O(1).
Comments