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.
%I A321082 #12 Nov 18 2018 10:02:15 %S A321082 0,1,3,3,11,11,11,11,11,267,267,1291,3339,7435,15627,15627,15627, %T A321082 15627,15627,15627,539915,539915,539915,4734219,13122827,29900043, %U A321082 29900043,97008907,97008907,365444363,365444363,1439186187,3586669835,7881637131,16471571723 %N A321082 Approximations up to 2^n for 2-adic integer log_(-3)(5). %C A321082 a(n) is the unique number x in [0, 2^(n-2) - 1] such that (-3)^x == 5 (mod 2^n). This is well defined because {(-3)^x mod 2^n : 0 <= x <= 2^(n-2) - 1} = {1, 5, 9, ..., 2^n - 3}. %C A321082 For any odd 2-adic integer x, define log(x) = -Sum_{k>=1} (1 - x)^k/k (which always converges over the 2-adic field) and log_x(y) = log(y)/log(x), then we have log(-1) = 0. If we further define exp(x) = Sum_{k>=0} x^k/k! for 2-adic integers divisible by 4, then we have exp(log(x)) = x if and only if x == 1 (mod 4). As a result, log_(-3)(5) = log_(-3)(-5) = log_3(5) = log_3(-5), but it's better to be stated as log_(-3)(5). %C A321082 For n > 0, a(n) is also the unique number x in [0, 2^(n-2) - 1] such that 3^x == -5 (mod 2^n). %C A321082 a(n) is the multiplicative inverse of A321080(n) modulo 2^(n-2). %H A321082 Jianing Song, <a href="/A321082/b321082.txt">Table of n, a(n) for n = 2..1000</a> %H A321082 Wikipedia, <a href="https://en.wikipedia.org/wiki/P-adic_number">p-adic number</a> %F A321082 a(2) = 0; for n >= 3, a(n) = a(n-1) if (-3)^a(n-1) - 5 is divisible by 2^n, otherwise a(n-1) + 2^(n-3). %F A321082 a(n) = Sum_{i=0..n-3} A321083(i)*2^i (empty sum yields 0 for n = 2). %F A321082 a(n) = A321690(n+2)/A321691(n+2) mod 2^n. %e A321082 The only number in the range [0, 2^(n-2) - 1] for n = 2 is 0, so a(2) = 0. %e A321082 (-3)^a(2) - 5 = -4 which is not divisible by 8, so a(3) = a(2) + 2^0 = 1. %e A321082 (-3)^a(3) - 5 = -8 which is not divisible by 16, so a(4) = a(3) + 2^1 = 3. %e A321082 (-3)^a(4) - 5 = -32 which is divisible by 32 but not 64, so a(5) = a(4) = 3, a(6) = a(5) + 2^3 = 11. %e A321082 (-3)^a(6) - 5 = -177152 which is divisible by 128, 256, 512, 1024 but not 2048, so a(7) = a(8) = a(9) = a(10) = a(6) = 11, a(11) = a(10) + 2^8 = 267. %o A321082 (PARI) b(n) = {my(v=vector(n)); v[2]=0; for(n=3, n, v[n] = v[n-1] + if(Mod(-3,2^n)^v[n-1] - 5==0, 0, 2^(n-3))); v} %o A321082 a(n) = b(n)[n] %o A321082 (PARI) a(n)={if(n<3, 0, truncate(log(5 + O(2^n))/log(-3 + O(2^n))))} \\ Program provided by _Andrew Howroyd_ %Y A321082 Cf. A321080, A321083, A321690, A321691. %K A321082 nonn %O A321082 2,3 %A A321082 _Jianing Song_, Oct 27 2018