OFFSET
1,1
COMMENTS
Integer solutions to the equation x=ceiling(r*floor(x/r)) where r=sqrt(2). - Benoit Cloitre, Feb 14 2004
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = ceiling(n*sqrt(2)). - Vincenzo Librandi, Oct 22 2011
EXAMPLE
a(10) = 15 because the 15^2 = 225 is the smallest square number greater than 2*10^2 = 200.
Can be built by recursive removals:
start with 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ...
get a(1) := 2 and remove the 2nd term (= 4):
[2] _ 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ...
get a(2) := 3 and remove the 3rd term (= 7):
[2, 3] _ 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, ...
get a(3) := 5 and remove the 5th term (= 11):
[2, 3, 5] _ 6, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, ...
get a(4) := 6 and remove the 6th term (= 14):
[2, 3, 5, 6] _ 8, 9, 10, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, ...
get a(5) := 8 and remove the 8th term (= 18):
[2, 3, 5, 6, 8] _ 9, 10, 12, 13, 15, 16, 17, 19, 20, 21, 22, 23, 24, ...
get a(6) = 9 and remove the 9th term (= 21), etc.
- Reinhard Zumkeller, Feb 04 2014
MATHEMATICA
Ceiling[Range[110]Sqrt[2]] (* Harvey P. Dale, Oct 30 2013 *)
PROG
(PARI) a(n)=ceil(n*sqrt(2)) \\ Charles R Greathouse IV, Oct 24 2011
(PARI) a(n)=sqrtint(2*n^2+sqrtint(8*n^2)+1) \\ Charles R Greathouse IV, Oct 24 2011
(Haskell)
a087057 n = a087057_list !! (n-1)
a087057_list = f [2..] where
f (x:xs) = x : f (us ++ vs) where (us, _ : vs) = splitAt (x - 1) xs
-- Reinhard Zumkeller, Feb 04 2014
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jens Voß, Aug 07 2003
STATUS
approved