OFFSET
0,9
FORMULA
This was conjectured to have g.f. (1+x^7) / (1+x+x^7) by Ralf Stephan, May 17 2007, but this is wrong. This g.f. produces a sequence which differs at a(57) = -153367. The g.f. gives a(57) = -153366. - Johannes W. Meijer, Aug 08 2011
a(0) = 1; a(n) = -Sum_{k=0..floor((n-1)/7)} a(k) * a(n-7*k-1). - Ilya Gutkovskiy, Mar 01 2022
MAPLE
nmax:=57: kmax:=nmax: for k from 0 to kmax do A:= proc(x): add(A101917(n)*x^n, n=0..k) end: f(x):=series(1/(1 + x*A(x^7)), x, k+1); for n from 0 to k do x(n):=coeff(f(x), x, n) od: A101917(k):=x(k): od: seq(A101917(n), n=0..nmax); # Johannes W. Meijer, Aug 08 2011
MATHEMATICA
m = 57; A[_] = 0; Do[A[x_] = 1/(1 + x A[x^7]) + O[x]^m // Normal, {m}]; CoefficientList[A[x], x] (* Jean-François Alcover, Nov 03 2019 *)
PROG
(PARI) a(n)=local(A); A=1-x; for(i=1, n\7+1, A=1/(1+x*subst(A, x, x^7)+x*O(x^n))); polcoeff(A, n, x)
(PARI) a(n)=local(M=contfracpnqn(concat(1, vector(ceil(log(n+1)/log(7))+1, n, 1/x^(7^(n-1)))))); polcoeff(M[1, 1]/M[2, 1]+x*O(x^(8*n+1)), 8*n+1)
CROSSREFS
KEYWORD
sign
AUTHOR
Paul D. Hanna, Dec 20 2004
STATUS
approved