%I #12 Aug 19 2016 04:33:49
%S 1,2,3,5,9,16,28,48,83,144,249,431,747,1294,2241,3882,6724,11646,
%T 20171,34937,60513,104812,181540,314437,544621,943311,1633863,2829934,
%U 4901589,8489801,14704767,25469404,44114302,76408212,132342905,229224635,397028714
%N a(1) = 1; a(n+1) = round(sqrt(3)*a(n)).
%H Chai Wah Wu, <a href="/A134009/b134009.txt">Table of n, a(n) for n = 1..1000</a>
%e a(6) = 16 because a(5) is 9 and round(sqrt(3)*9) = 16.
%t With[{c=Sqrt[3]},NestList[Floor[c #+1/2]&,1,45]] (* _Harvey P. Dale_, May 03 2011 *)
%o (Python)
%o from gmpy2 import isqrt_rem
%o A134009_list = [1]
%o for _ in range(1000):
%o i, j = isqrt_rem(3*A134009_list[-1]**2)
%o A134009_list.append(int(i+ int(4*(j-i) >= 1))) # _Chai Wah Wu_, Aug 16 2016
%K easy,nonn
%O 1,2
%A _Ben Paul Thurston_, Jan 09 2008
%E More terms from _Harvey P. Dale_, May 03 2011
|