A290558 Coefficients in 7-adic expansion of sqrt(2).
4, 5, 4, 0, 5, 4, 5, 4, 2, 0, 0, 4, 5, 5, 6, 4, 5, 5, 2, 0, 5, 3, 4, 0, 0, 3, 1, 1, 0, 3, 2, 1, 6, 5, 0, 3, 6, 2, 0, 4, 2, 2, 0, 2, 4, 2, 2, 4, 0, 5, 3, 2, 5, 3, 5, 2, 4, 0, 0, 6, 3, 1, 1, 5, 5, 4, 6, 0, 0, 5, 5, 4, 2, 2, 2, 4, 3, 0, 0, 3, 0, 5, 2, 2, 4, 4, 5, 3
Offset: 0
Keywords
Links
- Seiichi Manyama, Table of n, a(n) for n = 0..10000
- Peter Bala, Using Chebyshev polynomials to find the p-adic square roots of 2 and 3, Dec 2022.
Programs
-
Maple
t := proc(n) option remember; if n = 1 then 4 else irem(t(n-1)^7 - 7*t(n-1)^5 + 14*t(n-1)^3 - 7*t(n-1), 7^n) end if; end: convert(t(100), base, 7); # Peter Bala, Nov 20 2022
-
PARI
{ my(v=Vecrev( digits( truncate( (2+O(7^100))^(1/2) ), 7) )); vector(#v,k,6-v[k]+(k==1)) } \\ Joerg Arndt, Aug 06 2017
-
Ruby
require 'OpenSSL' def f_a(ary, a) (0..ary.size - 1).inject(0){|s, i| s + ary[i] * a ** i} end def df(ary) (1..ary.size - 1).map{|i| i * ary[i]} end def A(c_ary, k, m, n) x = OpenSSL::BN.new((-f_a(df(c_ary), k)).to_s).mod_inverse(m).to_i % m f_ary = c_ary.map{|i| x * i} f_ary[1] += 1 d_ary = [] ary = [0] a, mod = k, m (n + 1).times{|i| b = a % mod d_ary << (b - ary[-1]) / m ** i ary << b a = f_a(f_ary, b) mod *= m } d_ary end def A290558(n) A([-2, 0, 1], 4, 7, n) end p A290558(100)
Formula
a(n) = 6 - A051277(n) for n > 0.
Equals the 7-adic limit as n -> oo of 2*T(7^n,2) = the 7-adic limit as n -> oo of (2 + sqrt(3))^(7^n) + (2 - sqrt(3))^(7^n), where T(n,x) denotes the n-th Chebyshev polynomial of the first kind. - Peter Bala, Nov 20 2022