OFFSET
0,1
LINKS
Wikipedia, p-adic number
FORMULA
EXAMPLE
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.
PROG
(PARI) a(n)=(truncate( log(5+2*O(2^n)) )%2^(n+1))\2^n
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Paul D. Hanna, Nov 29 2008
STATUS
approved