OFFSET
0,15
COMMENTS
Convolution inverse of A111165.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
G. E. Andrews and B. C. Berndt, Your Hit Parade: The Top Ten Most Fascinating Formulas in Ramanujan's Lost Notebook, Notices Amer. Math. Soc., 55 (No. 1, 2008), 18-30. See p. 25, Equation (39).
FORMULA
Euler transform of period 3 sequence [ 1, -1, 0, ...]. - Michael Somos, Dec 23 2007
G.f.: Product_{k>=0} (1 - x^(3*k+2)) / (1 - x^(3*k+1)).
G.f.: exp( Sum_{n>=1} 1/(1 + x^n + x^(2n)) * x^n/n ). - Paul D. Hanna, Jan 23 2010
From Peter Bala, Dec 2012: (Start)
Let F(x) denote the o.g.f. of this sequence. For positive integer n >= 2, the real number F(1/n) has the simple continued fraction expansion 1 + 1/(n-1 + 1/(1 + 1/(n^2-1 + 1/(1 + 1/(n^3-1 + 1/(1 + ...)))))).
For n >= 2, F(-1/n) has the simple continued fraction expansion
(End)
EXAMPLE
From Peter Bala, Dec 2012: (Start)
F(1/10) = Sum_{n>=0} a(n)/10^n has the simple continued fraction expansion 1 + 1/(9 + 1/(1 + 1/(99 + 1/(1 + 1/(999 + 1/(1 + ...)))))).
F(-1/10) = Sum_{n>=0} (-1)^n*a(n)/10^n has the simple continued fraction expansion 1/(1 + 1/(9 + 1/(101 + 1/(999 + 1/(1001 + ...))))).
(End)
MAPLE
a:= proc(n) option remember; `if`(n=0, 1,
add(add(d*[0, 1, -1][irem(d, 3)+1],
d=numtheory[divisors](j))*a(n-j), j=1..n)/n)
end:
seq(a(n), n=0..80); # Alois P. Heinz, Apr 01 2014
MATHEMATICA
a[n_] := a[n] = If[n == 0, 1, Sum[Sum[d*{0, 1, -1}[[Mod[d, 3]+1]], {d, Divisors[j]}]*a[n-j], {j, 1, n}]/n]; Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Apr 09 2014, after Alois P. Heinz *)
PROG
(PARI) {a(n) = if( n<0, 0, polcoeff( prod(k=0, n\3, (1 - x^(3*k+2)) / (1 - x^(3*k+1)), 1 + x * O(x^n)), n))} /* Michael Somos, Dec 23 2007 */
(PARI) {a(n)=polcoeff(exp(sum(m=1, n+1, 1/(1+x^m+x^(2*m)+x*O(x^n))*x^m/m)), n)} \\ Paul D. Hanna, Jan 23 2010
(Sage) # uses[EulerTransform from A166861]
b = BinaryRecurrenceSequence(-1, -1)
a = EulerTransform(b)
print([a(n) for n in range(88)]) # Peter Luschny, Nov 17 2022
CROSSREFS
KEYWORD
sign,look
AUTHOR
N. J. A. Sloane, Nov 09 2005
STATUS
approved