A261491 a(n) = ceiling(2 + sqrt(8*n-4)).
4, 6, 7, 8, 8, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 29
Offset: 1
Examples
Start with the 5-cell area that is occupied by 0's and surrounded by stones 1..8. Add those surrounding stones to the area, one by one. At points 1, 2, 4 and 6, the number of surrounding stones is increased; elsewhere, it is not. Next, do the same with stones A..L. At points A, C, F and I, the number of surrounding stones is increased; elsewhere, it is not. ___D___ __A5C__ _B104E_ G30007J _F206I_ __H8K__ ___L___
Links
- Kival Ngaokrajang, Illustration of initial terms
Crossrefs
Cf. A001971.
Programs
-
Mathematica
Array[Ceiling[2 + Sqrt[8 # - 4]] &, {86}] (* Michael De Vlieger, Oct 23 2015 *)
-
PARI
a(n)=sqrtint(8*n-5)+3 \\ Charles R Greathouse IV, Aug 21 2015
Formula
a(n) = ceiling(2 + sqrt(8*n-4)).
For n > 2, a(n) - a(n-1) = 1 if n is of the form 2*(k^2+k+1), 2*k^2 + 1 or (k^2+k)/2 + 1, otherwise 0. - Jianing Song, Aug 10 2021
Comments