A135034 Positive integers n repeated 2n-1 times, with a leading a(0) = 0. Also: ceiling of square root of n.
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, 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, 9, 9, 9, 9, 9, 9, 9, 9
Offset: 0
Examples
a(1) = ceiling(sqrt(1)) = 1 a(6) = ceiling(sqrt(6)) = 3
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
Crossrefs
Programs
-
Mathematica
Table[Ceiling[Sqrt[n]],{n,0,100}] (* Mohammad K. Azarian, Jun 15 2016 *) Table[PadRight[{},2n-1,n],{n,0,10}]//Flatten (* Harvey P. Dale, May 15 2022 *)
-
PARI
A135034(n)=ceil(sqrt(n)) \\ M. F. Hasler, Nov 12 2017
-
Python
from math import isqrt def A135034(n): return isqrt(n-1)+1 if n else 0 # Chai Wah Wu, Nov 04 2024
Formula
a(n) = ceiling(sqrt(n)).
a(n) = A003059(n), for n >= 1. - R. J. Mathar, Jun 18 2008
Extensions
Edited and corrected by M. F. Hasler, Nov 12 2017