OFFSET
0,3
COMMENTS
The sequence A174341(n)/a(n) = 2, 1, 1/2, 1/4, 1/6, 1/6, 1/6, ... becomes 2, -1, 1/2, -1/4, 1/6,.. under inverse binomial transform: an autosequence, where each second term flips the sign.
LINKS
OEIS Wiki, Autosequence
PROG
(PARI)
B(n)=if(n!=1, bernfrac(n), -bernfrac(n));
a(n)=denominator(B(n) + 1/(n + 1));
for(n=0, 60, print1(a(n), ", ")) \\ Indranil Ghosh, Jun 19 2017
(Python)
from sympy import bernoulli, Rational
def B(n):
return bernoulli(n) if n != 1 else -bernoulli(n)
def a(n):
return (B(n) + Rational(1, n + 1)).as_numer_denom()[1]
[a(n) for n in range(61)] # Indranil Ghosh, Jun 19 2017
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
Paul Curtz, Mar 16 2010
STATUS
approved