OFFSET
0,12
LINKS
Paul D. Hanna, Table of n, a(n) for n = 0..1000
FORMULA
The conjecture that this has g.f. (1+x^8) / (1+x+x^8) by Ralf Stephan, May 17 2007 is wrong. The first difference occurs at a(73) = -42106. The g.f. gives a(73) = -42105. - Johannes W. Meijer, Aug 08 2011
a(0) = 1; a(n) = -Sum_{k=0..floor((n-1)/8)} a(k) * a(n-8*k-1). - Ilya Gutkovskiy, Mar 01 2022
MAPLE
nmax:=66: kmax:=nmax: for k from 0 to kmax do A:= proc(x): add(A101918(n)*x^n, n=0..k) end: f(x):=series(1/(1 + x*A(x^8)), x, k+1); for n from 0 to k do x(n):=coeff(f(x), x, n) od: A101918(k):=x(k): od: seq(A101918(n), n=0..nmax); # Johannes W. Meijer, Aug 08 2011
MATHEMATICA
nmax = 66; sol = {a[0] -> 1};
Do[A[x_] = Sum[a[k] x^k, {k, 0, n}] /. sol; eq = CoefficientList[A[x] - (1/(1 + x A[x^8])) + O[x]^(n + 1), x] == 0 /. sol; sol = sol ~Join~ Solve[eq][[1]], {n, 1, nmax}];
sol /. Rule -> Set;
a /@ Range[0, nmax] (* Jean-François Alcover, Nov 03 2019 *)
PROG
(PARI) {a(n)=local(A); A=1-x; for(i=1, n\8+1, A=1/(1+x*subst(A, x, x^8)+x*O(x^n))); polcoeff(A, n, x)}
for(n=0, 120, print1(a(n), ", "))
(PARI) {a(n)=local(M=contfracpnqn(concat(1, vector(ceil(log(n+1)/log(8))+1, n, 1/x^(8^(n-1)))))); polcoeff(M[1, 1]/M[2, 1]+x*O(x^(9*n+1)), 9*n+1)}
for(n=0, 120, print1(a(n), ", "))
CROSSREFS
KEYWORD
sign
AUTHOR
Paul D. Hanna, Dec 20 2004
STATUS
approved