A091661 Coefficients in a 10-adic square root of 1.
9, 4, 2, 1, 8, 7, 5, 2, 4, 6, 3, 8, 9, 1, 5, 2, 1, 5, 4, 8, 7, 4, 5, 9, 9, 3, 2, 3, 1, 2, 8, 0, 0, 8, 1, 2, 2, 9, 7, 1, 6, 4, 6, 4, 8, 6, 4, 8, 4, 1, 1, 1, 0, 0, 2, 2, 6, 7, 2, 7, 1, 6, 1, 9, 1, 0, 3, 3, 3, 4, 2, 1, 0, 8, 7, 9, 1, 0, 7, 7, 8, 5, 0, 6, 9, 3, 3, 6, 1, 2, 8, 3, 6, 4, 1, 0, 6, 0, 9, 7
Offset: 0
Links
- Seiichi Manyama, Table of n, a(n) for n = 0..9999
Programs
-
Mathematica
To calculate c, d, e, f use Mathematica algorithms for a, b and equations: c=a-b, d=1-c, e=b-1, f=a-1.
-
Ruby
def A(s, n) n.times{|i| m = 10 ** (i + 1) (0..9).each{|j| k = j * m + s if (k ** 2 - k) % (m * 10) == 0 s = k break end } } s end def A091661(n) str = (10 ** (n + 1) + A(5, n) - A(6, n)).to_s.reverse (0..n).map{|i| str[i].to_i} end p A091661(100) # Seiichi Manyama, Jul 31 2017
Formula
For n>0, a(n) = 9 - A063006(n).
Comments