Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #21 Jul 29 2022 20:30:24
%S 1,14,141,1414,14142,141421,1414214,14142136,141421356,1414213562,
%T 14142135624,141421356237,1414213562373,14142135623731,
%U 141421356237310,1414213562373095,14142135623730950,141421356237309505,1414213562373095049,14142135623730950488
%N Decimal expansion of sqrt(2) rounded to n places.
%D W. Rudin, Principles of Mathematical Analysis, 3rd ed., McGraw-Hill, 1976.
%H G. C. Greubel, <a href="/A011548/b011548.txt">Table of n, a(n) for n = 0..995</a> (terms 0..200 from Vincenzo Librandi)
%t Round[Table[N[Sqrt[2], k] 10^(k - 1), {k, 20}]] (* _Vincenzo Librandi_, Aug 17 2013 *)
%t Module[{nn=20,s},s=RealDigits[Sqrt[2],10,nn+1][[1]];Table[Round[ FromDigits[ Take[ s,n+1]]/10],{n,nn}]] (* _Harvey P. Dale_, Apr 04 2019 *)
%o (Python)
%o from math import isqrt
%o def A011548(n): return (m:=isqrt(k:=10**(n<<1)<<1))+int((k-m*(m+1)<<2)>=1) # _Chai Wah Wu_, Jul 29 2022
%Y Cf. A011547.
%K nonn,base,easy
%O 0,2
%A _N. J. A. Sloane_