A109965
Sum_i {i
1, 1, 2, 3, 4, 6, 8, 10, 13, 16, 20, 24, 28, 33, 38, 44, 50, 57, 64, 72, 80, 88, 97, 106, 116, 126, 137, 148, 160, 172, 185, 198, 212, 226, 241, 256, 272, 288, 304, 321, 338, 356, 374, 393, 412, 432, 452, 473, 494, 516, 538, 561, 584, 608, 632, 657, 682, 708, 734
Offset: 0
Keywords
Examples
a(5) = floor(sqrt(1)) + floor(sqrt(1)) + floor(sqrt(2)) + floor(sqrt(3)) + floor(sqrt(4)) = 1 + 1 + 1 + 1 + 2 = 6. j=3, k=5: a(29)=172, a(30)=185. [_Paul Weisenhorn_, Jun 26 2010]
Programs
-
Maple
a(0):=1: c:=0: for n from 1 to 100 do a(n):=a(n-1)+c: c:=floor(sqrt(a(n))): end do: # Paul Weisenhorn, Jun 22 2010 a(0)=a(1)=b(0)=1; for n from 1 to 100 do b(n)=floor(sqrt(a(n))): a(n+1)=a(n)+b(n): end do: a(n)=A109965(n); b(n)=A109964(n); # Paul Weisenhorn, Jun 26 2010
-
Mathematica
Prepend[RecurrenceTable[{a[n] == a[n - 1] + Floor[a[n - 1]^(1/2)], a[0] == 1}, a, {n, 0, 57}], 1] (* Geoffrey Critzer, May 25 2013 *) Join[{1},NestList[#+Floor[Sqrt[#]]&,1,60]] (* Harvey P. Dale, Oct 31 2018 *)
Formula
a(n) = a(n-1)+floor(sqrt(a(n-1))) = a(n-1)+A109964(n-1) for n>1.
Contribution from Paul Weisenhorn, Jun 26 2010: (Start)
a(2^(j+1)+j+2*k)=2^(2*j)+2^j*(2*k+1)+k*(k-1);
a(2^(j+1)+j+2*k+1)=2^(2*j)+2^j*(2*k+2)+k^2;
a(2^(j+1)+j-1)=2^(2*j); j=0..infinity; k=0..(2^j-1). (End)
Comments