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.

Showing 1-1 of 1 results.

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

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Aug 31 2002; revised May 03 2003

Keywords

Comments

Length of n-th run of consecutive identical terms is given by A028913 - Ralf Stephan.

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.
		

Crossrefs

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).
Showing 1-1 of 1 results.