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.

A290563 Coefficients in 5-adic expansion of 3^(1/3).

This page as a plain text file.
%I A290563 #21 Oct 24 2018 02:33:05
%S A290563 2,2,3,1,0,3,3,2,1,2,0,0,0,2,3,4,3,3,4,4,0,3,2,0,2,2,2,2,0,1,0,3,0,1,
%T A290563 0,0,0,4,0,0,0,0,1,0,2,3,3,1,4,0,3,4,4,3,1,3,2,4,4,3,0,3,3,1,1,2,0,3,
%U A290563 0,2,3,4,3,0,2,2,2,3,1,4,3,2,0,1,0,3,3,4
%N A290563 Coefficients in 5-adic expansion of 3^(1/3).
%H A290563 Seiichi Manyama, <a href="/A290563/b290563.txt">Table of n, a(n) for n = 0..10000</a>
%o A290563 (Ruby)
%o A290563 require 'OpenSSL'
%o A290563 def f_a(ary, a)
%o A290563   (0..ary.size - 1).inject(0){|s, i| s + ary[i] * a ** i}
%o A290563 end
%o A290563 def df(ary)
%o A290563   (1..ary.size - 1).map{|i| i * ary[i]}
%o A290563 end
%o A290563 def A(c_ary, k, m, n)
%o A290563   x = OpenSSL::BN.new((-f_a(df(c_ary), k)).to_s).mod_inverse(m).to_i % m
%o A290563   f_ary = c_ary.map{|i| x * i}
%o A290563   f_ary[1] += 1
%o A290563   d_ary = []
%o A290563   ary = [0]
%o A290563   a, mod = k, m
%o A290563   (n + 1).times{|i|
%o A290563     b = a % mod
%o A290563     d_ary << (b - ary[-1]) / m ** i
%o A290563     ary << b
%o A290563     a = f_a(f_ary, b)
%o A290563     mod *= m
%o A290563   }
%o A290563   d_ary
%o A290563 end
%o A290563 def A290563(n)
%o A290563   A([-3, 0, 0, 1], 2, 5, n)
%o A290563 end
%o A290563 p A290563(100)
%o A290563 (PARI) Vecrev( digits( truncate( (3+O(5^100))^(1/3) ), 5) ) \\ _Joerg Arndt_, Aug 06 2017
%Y A290563 Cf. A290566, A290568.
%K A290563 nonn
%O A290563 0,1
%A A290563 _Seiichi Manyama_, Aug 06 2017