OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
MAPLE
a:= n-> round(sqrt(21)^n):
seq(a(n), n=0..25); # Alois P. Heinz, Jul 29 2022
MATHEMATICA
Floor[(Sqrt[21])^Range[0, 25]+1/2] (* Harvey P. Dale, Sep 22 2011 *)
PROG
(PARI) a(n)=round(sqrt(21)^n) \\ Charles R Greathouse IV, Nov 18 2011
(Magma) [Round(Sqrt(21)^n): n in [0..30]]; // Vincenzo Librandi, Nov 20 2011
(Python)
from math import isqrt
def A017968(n): return (m:=isqrt(k:=21**n))+int((k-m*(m+1)<<2)>=1) # Chai Wah Wu, Jul 29 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved