OFFSET
0
COMMENTS
arctanh(x) = x + x^3/3 + x^5/5 + x^7/7 + ...
LINKS
Robert Israel, Table of n, a(n) for n = 0..2500
Wikipedia, p-adic number
EXAMPLE
arctanh(2) = ...0111000110010001010010010111010001111010.
MAPLE
N:= 100: # for a(0)..a(N)
T:= 0:
for k from 1 to N by 2 do
T:= padic:-evalp(T + 2^k/k, 2, N+1)
od:
0, op(op([1, 3], T)); # Robert Israel, Jul 10 2020
PROG
(PARI) a(n) = lift(sum(i=0, (n-1)/2, Mod(2^(2*i+1)/(2*i+1), 2^(n+1))))\2^n
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jianing Song, Aug 15 2019
STATUS
approved