A004540 Expansion of sqrt(2) in base 3.
1, 1, 0, 2, 0, 1, 1, 2, 2, 1, 2, 2, 2, 0, 0, 1, 2, 1, 2, 2, 1, 2, 2, 2, 0, 0, 1, 1, 2, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2, 2, 0, 1, 2, 1, 1, 1, 2, 0, 2, 0, 2, 2, 0, 1, 2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 1, 0, 0, 0, 2, 2, 1, 1, 2, 1, 0, 1, 1, 2, 2, 1, 0, 2, 0, 2, 1, 2, 1, 0, 0, 2, 0, 2, 0, 0, 2, 1, 2, 0
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..5000
- Jason Kimberley, Index of expansions of sqrt(d) in base b
Programs
-
Magma
Prune(Reverse(IntegerToSequence(Isqrt(2*3^200), 3))); // Vincenzo Librandi, Jan 07 2018
-
Mathematica
RealDigits[Sqrt[2],3,120][[1]] (* Harvey P. Dale, Sep 20 2016 *)