login
A182558
a(n) = a(n-1)*2 - floor(sqrt(a(n-2))).
1
0, 1, 2, 3, 5, 9, 16, 29, 54, 103, 199, 388, 762, 1505, 2983, 5928, 11802, 23528, 46948, 93743, 187270, 374234, 748036, 1495461, 2990058, 5978894, 11956059, 23909673, 47815889, 95626889, 191246864, 382483950, 764954071, 1529888585, 3059749513
OFFSET
0,3
LINKS
FORMULA
a(0)=0, a(1)=1, a(n) = a(n-1)*2 - floor(sqrt(a(n-2))).
MATHEMATICA
nxt[{a_, b_}]:={b, 2b-Floor[Sqrt[a]]}; NestList[nxt, {0, 1}, 40][[All, 1]] (* Harvey P. Dale, Apr 29 2017 *)
PROG
(Python)
import math
prpr = 0
prev = 1
for n in range(55):
. current = prev*2 - int(math.sqrt(prpr))
. print prpr,
. prpr = prev
. prev = current
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, May 05 2012
STATUS
approved