cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A073047 Least k such that x(k)=0 where x(1)=n and x(k)=k*floor(x(k-1)/k).

This page as a plain text file.
%I A073047 #15 Jun 07 2020 08:16:17
%S A073047 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,
%T A073047 10,11,11,11,11,11,11,11,11,12,12,12,12,12,12,13,13,13,13,13,13,13,13,
%U A073047 13,13,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16
%N A073047 Least k such that x(k)=0 where x(1)=n and x(k)=k*floor(x(k-1)/k).
%C A073047 Length of n-th run of consecutive identical terms is given by A028913 - _Ralf Stephan_.
%H A073047 Robert Israel, <a href="/A073047/b073047.txt">Table of n, a(n) for n = 1..10000</a>
%F A073047 Presumably a(n) = sqrt(Pi*n)+O(1).
%e A073047 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.
%p A073047 f:= proc(n,k) option remember;
%p A073047   if n = 0 then return k-1 fi;
%p A073047   procname(k*floor(n/k),k+1)
%p A073047 end proc:
%p A073047 map(f, [$1..100], 1); # _Robert Israel_, Jul 25 2019
%t A073047 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]]]];
%t A073047 Array[a, 100] (* _Jean-François Alcover_, Jun 07 2020 *)
%o A073047 (PARI) a(n)=if(n<0,0,s=n; c=1; while(s-s%c>0,s=s-s%c; c++); c)
%Y A073047 Cf. A002491, A007952, A082527, A082528.
%K A073047 easy,nonn
%O A073047 1,1
%A A073047 _Benoit Cloitre_, Aug 31 2002; revised May 03 2003