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.

A290558 Coefficients in 7-adic expansion of sqrt(2).

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Aug 05 2017

Keywords

Crossrefs

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