cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A017968 Powers of sqrt(21) rounded to nearest integer.

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