login
A293137
a(0) = 0, and a(n) = floor(2*sqrt(n)) - 1 for n >= 1.
2
0, 1, 1, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18
OFFSET
0,4
COMMENTS
Conjecture: a(n) is index k of last nonzero entry in row n of A293136.
LINKS
FORMULA
G.f.: (1-x)^(-1) * Sum_{k>=0} (x^(4*k^2+10*k+7)+x^((2*k+1)^2)+x^((2*k+2)^2)+x^(4*k^2+6*k+3)). - Robert Israel, Oct 01 2017
MAPLE
0, seq(seq(k, n=ceil(((k+1)/2)^2) .. ceil(((k+2)/2)^2)-1), k=0..18); # Robert Israel, Oct 01 2017
PROG
(PARI) a(n)=if(n==0, 0, floor(2*sqrt(n)) - 1);
(Python)
from math import isqrt
def A293137(n): return isqrt(n<<2)-1 if n else 0 # Chai Wah Wu, Jul 28 2022
CROSSREFS
Sequence in context: A178042 A308950 A193832 * A087823 A230418 A037037
KEYWORD
nonn
AUTHOR
Joerg Arndt, Oct 01 2017
STATUS
approved