|
|
A118827
|
|
2-adic continued fraction of zero, where a(n) = 1 if n is odd, otherwise -2*A006519(n/2).
|
|
6
|
|
|
1, -2, 1, -4, 1, -2, 1, -8, 1, -2, 1, -4, 1, -2, 1, -16, 1, -2, 1, -4, 1, -2, 1, -8, 1, -2, 1, -4, 1, -2, 1, -32, 1, -2, 1, -4, 1, -2, 1, -8, 1, -2, 1, -4, 1, -2, 1, -16, 1, -2, 1, -4, 1, -2, 1, -8, 1, -2, 1, -4, 1, -2, 1, -64, 1, -2, 1, -4, 1, -2, 1, -8, 1, -2, 1, -4, 1, -2, 1, -16, 1, -2, 1, -4, 1, -2, 1, -8, 1, -2, 1, -4, 1, -2, 1, -32, 1, -2, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
Multiplicative with a(2^e) = -2^e, and a(p^e) = 1 for an odd prime p.
Dirichlet g.f.: zeta(s) * (1 - 2^(1-s) + 1/(2-2^s)).
Sum_{k=1..n} a(k) ~ (-1/(2*log(2))) * n *(log(n) + gamma - log(2)/2 - 1), where gamma is Euler's constant (A001620). (End)
|
|
EXAMPLE
|
at k = 4*n-1: 0.
Convergents begin:
1/1, -1/-2, 0/-1, -1/2, -1/1, 1/0, 0/1, 1/-8,
1/-7, -1/6, 0/-1, -1/10, -1/9, 1/-8, 0/1, 1/-24,
1/-23, -1/22, 0/-1, -1/26, -1/25, 1/-24, 0/1, 1/-32,
1/-31, -1/30, 0/-1, -1/34, -1/33, 1/-32, 0/1, 1/-64, ...
|
|
MATHEMATICA
|
Array[If[OddQ@ #, 1, -2*2^(IntegerExponent[#, 2] - 1)] &, 99] (* Michael De Vlieger, Nov 06 2018 *)
|
|
PROG
|
(PARI) a(n)=local(p=+1, q=-2); if(n%2==1, p, q*2^valuation(n/2, 2))
|
|
CROSSREFS
|
|
|
KEYWORD
|
cofr,sign,mult
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|