The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A309443 Coefficients in 5-adic expansion of 4^(1/3). 12

%I #19 Aug 04 2019 01:38:26

%S 4,1,2,4,4,3,3,4,0,4,2,1,1,1,4,2,2,3,3,2,3,4,2,3,2,0,3,4,2,1,4,3,3,3,

%T 4,4,0,3,2,0,0,2,4,2,3,4,4,1,4,4,1,3,1,2,2,0,3,0,1,1,3,2,0,0,0,1,2,1,

%U 4,2,1,0,4,0,2,1,4,0,0,3,1,0,4,1,2,4,2,0,1,4,4

%N Coefficients in 5-adic expansion of 4^(1/3).

%H Robert Israel, <a href="/A309443/b309443.txt">Table of n, a(n) for n = 0..10000</a>

%p op([1,3], padic:-rootp(x^3-4,5,101)); # _Robert Israel_, Aug 04 2019

%o (Ruby)

%o require 'OpenSSL'

%o def f_a(ary, a)

%o (0..ary.size - 1).inject(0){|s, i| s + ary[i] * a ** i}

%o end

%o def df(ary)

%o (1..ary.size - 1).map{|i| i * ary[i]}

%o end

%o def A(c_ary, k, m, n)

%o x = OpenSSL::BN.new((-f_a(df(c_ary), k)).to_s).mod_inverse(m).to_i % m

%o f_ary = c_ary.map{|i| x * i}

%o f_ary[1] += 1

%o d_ary = []

%o ary = [0]

%o a, mod = k, m

%o (n + 1).times{|i|

%o b = a % mod

%o d_ary << (b - ary[-1]) / m ** i

%o ary << b

%o a = f_a(f_ary, b)

%o mod *= m

%o }

%o d_ary

%o end

%o def A309443(n)

%o A([-4, 0, 0, 1], 4, 5, n)

%o end

%o p A309443(100)

%o (PARI) Vecrev(digits(truncate((4+O(5^100))^(1/3)), 5))

%Y Cf. A309444.

%Y Digits of p-adic integers:

%Y A269591, A269592 (5-adic, sqrt(-4));

%Y A210850, A210851 (5-adic, sqrt(-1));

%Y A290566 (5-adic, 2^(1/3));

%Y A290563 (5-adic, 3^(1/3)).

%K nonn,base

%O 0,1

%A _Seiichi Manyama_, Aug 03 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 23 18:34 EDT 2024. Contains 372765 sequences. (Running on oeis4.)