The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A278586 Start with X = n^2. Repeatedly replace X with X - ceiling(X/n); a(n) is the number of steps to reach 0. 9
1, 3, 5, 8, 11, 14, 17, 21, 24, 28, 32, 36, 40, 44, 49, 53, 57, 62, 66, 71, 75, 80, 84, 90, 94, 99, 103, 109, 113, 118, 123, 128, 133, 139, 143, 149, 154, 159, 164, 170, 175, 180, 185, 191, 196, 201, 207, 212, 217, 223, 229, 234, 240, 246, 251, 256, 262, 268, 273, 279, 284, 290, 296, 302, 308 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
Matthijs Coster, Een Eigen Rij - Uitslag Prijsvraag, Pythagoras, Number 6, June 2016, pp. 20-21. The sequence was discovered by Pim Spelier.
MAPLE
A278586 := proc(n)
local x, a;
x := n^2 ;
a := 0 ;
while x <> 0 do
x:= x-ceil(x/n) ;
a := a+1 ;
end do:
a;
end proc: # R. J. Mathar, Dec 02 2016
MATHEMATICA
f[n_] := Length@ NestWhileList[# - Ceiling[#/n] &, n^2, # > 1 &]; Array[f, 65] (* Robert G. Wilson v, Dec 01 2016 *)
PROG
(Magma) a:=[]; for n in [1..58] do k:=n^2; count:=0; while k gt 0 do count+:=1; k-:=Ceiling(k/n); end while; a[n]:=count; end for; a; // Jon E. Schoenfield, Dec 01 2016
CROSSREFS
Cf. A052488.
Sequence in context: A102696 A130262 A094228 * A001855 A006591 A310027
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Dec 02 2016, based on discussions about the Pythagoras article in the Sequence Fans Mailing List, Dec 01 2016. Jack Brennen provided the definition given here.
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 18 05:02 EDT 2024. Contains 372618 sequences. (Running on oeis4.)