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.

Showing 1-4 of 4 results.

A152228 2-adic expansion of log(5).

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0
Offset: 0

Views

Author

Paul D. Hanna, Nov 29 2008

Keywords

Examples

			log(5) (2-adic) = ...0001110110010010000000011100100010011001111100 (base 2).
log(5) (2-adic) = 2^2 + 2^3 + 2^4 + 2^5 + 2^6 + 2^9 + 2^10 + 2^13 +...
exp( log(5) (2-adic) ) = 101 (base 2) = 5.
		

Crossrefs

Cf. A068434, A321690, A321694 (log(-3)).

Programs

  • PARI
    a(n)=(truncate( log(5+2*O(2^n)) )%2^(n+1))\2^n

Formula

a(n) = (A321690(n+1) - A321690(n))/2^n. - Jianing Song, Nov 17 2018

A321691 Approximations up to 2^n for the 2-adic integer log(-3).

Original entry on oeis.org

0, 0, 0, 4, 4, 20, 52, 116, 244, 244, 244, 244, 2292, 2292, 10484, 26868, 59636, 59636, 190708, 190708, 190708, 1239284, 1239284, 1239284, 9627892, 9627892, 43182324, 43182324, 43182324, 43182324, 580053236, 580053236, 580053236, 4875020532
Offset: 0

Views

Author

Jianing Song, Nov 17 2018

Keywords

Comments

Let 4Q_2 = {x belongs to Q_2 : |x|2 <= 1/4} and 4Q_2 + 1 = {x belongs to Q_2: |x - 1|_2 <= 1/4}. Define exp(x) = Sum{k>=0} x^k/k! and log(x) = -Sum_{k>=1} (1 - x)^k/k over 2-adic field, then exp(x) is a one-to-one mapping from 4Q_2 to 4Q_2 + 1, and log(x) is the inverse of exp(x).

Examples

			a(3) = (-4 + O(2^3)) mod 8 = (-4) mod 8 = 4.
a(6) = (-4 - 4^2/2 - O(2^6)) mod 64 = (-12) mod 64 = 52.
a(10) = (-4 - 4^2/2 - 4^3/3 - 4^4/4 - O(2^10)) mod 1024 = (-292/3) mod 1024 = 244.
a(11) = (-4 - 4^2/2 - 4^3/3 - 4^4/4 - 4^5/5 - O(2^11)) mod 2048 = (-4532/15) mod 2048 = 244.
		

Crossrefs

Cf. A321690 (log(5)), A321694.

Programs

  • PARI
    a(n) = if(n, lift(log(-3 + O(2^n))), 0);

Formula

a(n) = Sum_{i=0..n-1} A321694(i)*2^i.
Conjecture: a(n) = 2*A309753(n-1). - R. J. Mathar, Aug 06 2023

A321080 Approximations up to 2^n for 2-adic integer log_5(-3).

Original entry on oeis.org

0, 1, 3, 3, 3, 3, 35, 35, 163, 163, 675, 1699, 1699, 1699, 9891, 9891, 42659, 42659, 42659, 304803, 304803, 304803, 304803, 4499107, 4499107, 21276323, 21276323, 21276323, 155494051, 423929507, 423929507, 1497671331, 1497671331, 1497671331, 10087605923
Offset: 2

Views

Author

Jianing Song, Oct 27 2018

Keywords

Comments

a(n) is the unique number x in [0, 2^(n-2) - 1] such that 5^x == -3 (mod 2^n). This is well defined because {5^x mod 2^n : 0 <= x <= 2^(n-2) - 1} = {1, 5, 9, ..., 2^n - 3}.
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_5(-3) = log_5(3) = log_(-5)(3) = log_(-5)(-3), but it's better to be stated as log_5(-3).
For n > 0, a(n) is also the unique number x in [0, 2^(n-2) - 1] such that (-5)^x == 3 (mod 2^n).
a(n) is the multiplicative inverse of A321082(n) modulo 2^(n-2).

Examples

			The only number in the range [0, 2^(n-2) - 1] for n = 2 is 0, so a(2) = 0.
5^a(2) + 3 = 4 which is not divisible by 8, so a(3) = a(2) + 2^0 = 1.
5^a(3) + 3 = 8 which is not divisible by 16, so a(4) = a(3) + 2^1 = 3.
5^a(4) + 3 = 128 which is divisible by 32, 64 and 128 but not 256, so a(5) = a(6) = a(7) = a(4) = 3, a(8) = a(7) + 2^5 = 35.
5^a(8) + 3 = ... which is divisible by 512 but not 1024, so a(9) = a(8) = 35, a(10) = a(9) + 2^7 = 163.
		

Crossrefs

Programs

  • PARI
    b(n) = {my(v=vector(n)); for(n=3, n, v[n] = v[n-1] + if(Mod(5,2^n)^v[n-1] + 3==0, 0, 2^(n-3))); v}
    a(n) = b(n)[n] \\ Program provided by Andrew Howroyd
    
  • PARI
    a(n)={if(n<3, 0, truncate(log(-3 + O(2^n))/log(5 + O(2^n))))} \\ Andrew Howroyd, Nov 03 2018

Formula

a(2) = 0; for n >= 3, a(n) = a(n-1) if 5^a(n-1) + 3 is divisible by 2^n, otherwise a(n-1) + 2^(n-3).
a(n) = Sum_{i=0..n-3} A321081(i)*2^i (empty sum yields 0 for n = 2).
a(n) = A321691(n+2)/A321690(n+2) mod 2^n.

A321082 Approximations up to 2^n for 2-adic integer log_(-3)(5).

Original entry on oeis.org

0, 1, 3, 3, 11, 11, 11, 11, 11, 267, 267, 1291, 3339, 7435, 15627, 15627, 15627, 15627, 15627, 15627, 539915, 539915, 539915, 4734219, 13122827, 29900043, 29900043, 97008907, 97008907, 365444363, 365444363, 1439186187, 3586669835, 7881637131, 16471571723
Offset: 2

Views

Author

Jianing Song, Oct 27 2018

Keywords

Comments

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}.
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).
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).
a(n) is the multiplicative inverse of A321080(n) modulo 2^(n-2).

Examples

			The only number in the range [0, 2^(n-2) - 1] for n = 2 is 0, so a(2) = 0.
(-3)^a(2) - 5 = -4 which is not divisible by 8, so a(3) = a(2) + 2^0 = 1.
(-3)^a(3) - 5 = -8 which is not divisible by 16, so a(4) = a(3) + 2^1 = 3.
(-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.
(-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.
		

Crossrefs

Programs

  • 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}
    a(n) = b(n)[n]
    
  • PARI
    a(n)={if(n<3, 0, truncate(log(5 + O(2^n))/log(-3 + O(2^n))))} \\ Program provided by Andrew Howroyd

Formula

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).
a(n) = Sum_{i=0..n-3} A321083(i)*2^i (empty sum yields 0 for n = 2).
a(n) = A321690(n+2)/A321691(n+2) mod 2^n.
Showing 1-4 of 4 results.