A166872 a(n) = floor(n/2 + 2 - sqrt(17/4 + 2*n)).
0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 17, 17, 18, 18, 18, 19, 19, 20, 20, 20, 21, 21, 22, 22, 22, 23, 23, 24, 24, 24, 25, 25, 26, 26, 27, 27, 27, 28, 28, 29
Offset: 1
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
- Matthieu Latapy, Roberto Mantaci, Michel Morvan and Ha Duong Phan, Structure of some sand pile model, Theoretical Computer Science 262 (2001), pp. 525-556.
Crossrefs
Cf. A056219.
Programs
-
Maple
nk:= k -> ceil(2*(k+1)+sqrt(16*k+17)) - ceil(2*k+sqrt(16*k+1)): seq(k$nk(k), k=0..50); # Robert Israel, May 27 2016
-
Mathematica
Table[Floor[n/2 + 2 - Sqrt[2*n + 17/4]], {n, 1, 100}] (* G. C. Greubel, May 27 2016 *)
Formula
a(n) = floor(n/2 + 2 - sqrt(17/4 + 2*n)).
a(n) = k iff ceiling(2*k + sqrt(16*k+1)) <= n <= ceiling(2*k + 3 + sqrt(16*k+17)). - Robert Israel, May 27 2016
Extensions
Edited by the associate editors of the OEIS, Nov 09 2009
Comments