%I #26 Nov 04 2024 17:14:56
%S 0,1,2,2,2,3,3,3,3,3,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,
%T 6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,
%U 9,9,9,9,9,9,9,9
%N Positive integers n repeated 2n-1 times, with a leading a(0) = 0. Also: ceiling of square root of n.
%H Harvey P. Dale, <a href="/A135034/b135034.txt">Table of n, a(n) for n = 0..1000</a>
%F a(n) = ceiling(sqrt(n)).
%F a(n) = A003059(n), for n >= 1. - _R. J. Mathar_, Jun 18 2008
%e a(1) = ceiling(sqrt(1)) = 1
%e a(6) = ceiling(sqrt(6)) = 3
%t Table[Ceiling[Sqrt[n]],{n,0,100}] (* _Mohammad K. Azarian_, Jun 15 2016 *)
%t Table[PadRight[{},2n-1,n],{n,0,10}]//Flatten (* _Harvey P. Dale_, May 15 2022 *)
%o (PARI) A135034(n)=ceil(sqrt(n)) \\ _M. F. Hasler_, Nov 12 2017
%o (Python)
%o from math import isqrt
%o def A135034(n): return isqrt(n-1)+1 if n else 0 # _Chai Wah Wu_, Nov 04 2024
%Y Cf. A005408, A003059 (restriction to positive indices), A000194 (round(sqrt(n))), A000196 (floor(sqrt(n))).
%Y Partial sums of A010052.
%K easy,nonn,changed
%O 0,3
%A _William A. Tedeschi_, Feb 10 2008
%E Edited and corrected by _M. F. Hasler_, Nov 12 2017