%I #28 Jul 29 2022 20:23:35
%S 1,5,21,96,441,2021,9261,42439,194481,891224,4084101,18715702,
%T 85766121,393029742,1801088541,8253624572,37822859361,173326116021,
%U 794280046581,3639848436450,16679880978201,76436817165460,350277500542221,1605173160474663,7355827511386641
%N Powers of sqrt(21) rounded to nearest integer.
%H Vincenzo Librandi, <a href="/A017968/b017968.txt">Table of n, a(n) for n = 0..1000</a>
%p a:= n-> round(sqrt(21)^n):
%p seq(a(n), n=0..25); # _Alois P. Heinz_, Jul 29 2022
%t Floor[(Sqrt[21])^Range[0,25]+1/2] (* _Harvey P. Dale_, Sep 22 2011 *)
%o (PARI) a(n)=round(sqrt(21)^n) \\ _Charles R Greathouse IV_, Nov 18 2011
%o (Magma) [Round(Sqrt(21)^n): n in [0..30]]; // _Vincenzo Librandi_, Nov 20 2011
%o (Python)
%o from math import isqrt
%o def A017968(n): return (m:=isqrt(k:=21**n))+int((k-m*(m+1)<<2)>=1) # _Chai Wah Wu_, Jul 29 2022
%Y Cf. A010477 (sqrt(21)), A017967.
%Y Bisection gives A009965 (even part).
%K nonn
%O 0,2
%A _N. J. A. Sloane_