A060984 a(1) = 1; a(n+1) = a(n) + (largest square <= a(n)).
1, 2, 3, 4, 8, 12, 21, 37, 73, 137, 258, 514, 998, 1959, 3895, 7739, 15308, 30437, 60713, 121229, 242333, 484397, 967422, 1933711, 3865811, 7730967, 15459367, 30912128, 61814609, 123625653, 247235577, 494448306, 988888002, 1977738918, 3955408759, 7910812423
Offset: 1
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)
Programs
-
Haskell
a060984 n = a060984_list !! (n-1) a060984_list = iterate (\x -> x + a048760 x) 1 -- Reinhard Zumkeller, Dec 24 2013
-
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 *)
-
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
-
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
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
Comments