OFFSET
0,3
COMMENTS
The recursion to generate this sequence (excluding the additional extra 1 at the outset) occurs in Chapter 3, Exercise 28, page 97 in Graham, Knuth and Patashnik, Concrete Mathematics, 2nd Edition, Addison Wesley, 1994. A solution is provided on page 509. - Steve Tanny (tanny(AT)math.utoronto.ca), Apr 02 2008
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)
EXAMPLE
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]
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:
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Henry Bottomley, Jul 06 2005
STATUS
approved