login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A309445 Coefficients in 7-adic expansion of 2^(1/5). 11

%I

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

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

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

%N Coefficients in 7-adic expansion of 2^(1/5).

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

%p op([1,3], padic:-rootp(x^5-2,7,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 A309445(n)

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

%o end

%o p A309445(100)

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

%Y Cf. A309450.

%Y Digits of p-adic integers:

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

%Y A309446 (7-adic, 3^(1/5));

%Y A309447 (7-adic, 4^(1/5));

%Y A309448 (7-adic, 5^(1/5));

%Y A309449 (7-adic, 6^(1/5)).

%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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 22 12:56 EDT 2021. Contains 345380 sequences. (Running on oeis4.)