login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A126389
Numerators in a series for the "alternating Euler constant" log(4/Pi).
1
1, -1, 2, -2, -1, 1, 1, -1, 1, -1, 3, -3, -2, 2, 2, -2, 2, -2, 2, -2, 4, -4, -3, 3, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 3, -3, -1, 1, 1, -1, 1, -1, 3, -3, 1, -1, 3, -3, 3, -3, 5, -5, -4, 4, -2, 2, -2, 2, -2, 2, 2, -2, -2, 2, 2, -2, 2, -2, 2, -2, 4, -4, -2, 2
OFFSET
2,3
COMMENTS
Nonzero values of (-1)^n*b(floor(n/2)) for n > 1, where b(n) = (# of 1's) - (# of 0's) in the base 2 expansion of n. The denominators of the series are A126388.
LINKS
J. Sondow, New Vacca-Type Rational Series for Euler's Constant and Its "Alternating" Analog ln(4/Pi), Additive Number Theory, Festschrift In Honor of the Sixtieth Birthday of Melvyn B. Nathanson (D. Chudnovsky and G. Chudnovsky, eds.), Springer, 2010, pp. 331-340.
Eric Weisstein's MathWorld, Digit Count
FORMULA
Log(4/Pi) = 1/2 - 1/3 + 2/6 - 2/7 - 1/8 + 1/9 + 1/10 - 1/11 + 1/12 - 1/13 + 3/14 - 3/15 - 2/16 + 2/17 + 2/22 - ...
EXAMPLE
floor(15/2) = 7 = 111 base 2, which has (# of 1's) - (# of 0's) = 3, so (-1)^15*3 = -3 is a term.
MATHEMATICA
b[n_] := DigitCount[n, 2, 1] - DigitCount[n, 2, 0]; L = {}; Do[If[b[Floor[n/2]] != 0, L = Append[L, (-1)^n*b[Floor[n/2]]]], {n, 2, 100}]; L
KEYWORD
base,sign
AUTHOR
Jonathan Sondow, Jan 01 2007
STATUS
approved