OFFSET
1,2
COMMENTS
Arises in analyzing "put-or-take" games (see Winning Ways, 484-486, 501-503), the prototype being Epstein's Put-or-Take-a-Square game.
REFERENCES
E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982.
R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section E26.
LINKS
Henry J. Smith and Harvey P. Dale, Table of n, a(n) for n = 1..1000 (first 500 terms from Henry J. Smith)
FORMULA
a(n+1) = a(n)+[sqrt(a(n))]^2 = a(n)+A061886(n) = a(n)+A048760(a(n)) = A061887(a(n)). - Henry Bottomley, May 12 2001
a(n) ~ c * 2^n, where c = 0.11511532187216693... (see A237888). - Vaclav Kotesovec, Feb 15 2014
MATHEMATICA
a[1] = 1; a[n_] := a[n] = a[n - 1] + Floor[ Sqrt[ a[n - 1] ] ]^2; Table[ a[n], {n, 1, 40} ]
RecurrenceTable[{a[1]==1, a[n]==a[n-1]+Floor[Sqrt[a[n-1]]]^2}, a, {n, 40}] (* Harvey P. Dale, Nov 19 2011 *)
NestList[#+Floor[Sqrt[#]]^2&, 1, 40] (* Harvey P. Dale, Jan 22 2013 *)
PROG
(PARI) { default(realprecision, 100); for (n=1, 500, if (n==1, a=1, a+=floor(sqrt(a))^2); write("b060984.txt", n, " ", a); ) } \\ Harry J. Smith, Jul 15 2009
(Haskell)
a060984 n = a060984_list !! (n-1)
a060984_list = iterate (\x -> x + a048760 x) 1
-- Reinhard Zumkeller, Dec 24 2013
(Python)
from sympy import integer_nthroot
A060984_list = [1]
for i in range(10**3): A060984_list.append(A060984_list[-1]+integer_nthroot(A060984_list[-1], 2)[0]**2) # Chai Wah Wu, Apr 02 2021
(Python)
from math import isqrt
from itertools import accumulate
def f(an, _): return an + isqrt(an)**2
print(list(accumulate([1]*36, f))) # Michael S. Branicky, Apr 02 2021
CROSSREFS
KEYWORD
nonn,easy,nice,changed
AUTHOR
R. K. Guy, May 11 2001
EXTENSIONS
STATUS
approved