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”).

A345009
a(0) = 1; a(5*n) = a(n) - a(n-1), a(5*n+1) = a(5*n+2) = a(5*n+3) = a(5*n+4) = a(n).
1
1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, -1, 0, 0, 0, 0, 1
OFFSET
0
FORMULA
G.f. A(x) satisfies: A(x) = (1 + x + x^2 + x^3 + x^4 - x^5) * A(x^5).
G.f.: Product_{k>=0} (1 + x^(5^k) + x^(2*5^k) + x^(3*5^k) + x^(4*5^k) - x^(5^(k+1))).
MATHEMATICA
a[0] = 1; a[n_] := Switch[Mod[n, 5], 0, a[n/5] - a[(n - 5)/5], 1, a[(n - 1)/5], 2, a[(n - 2)/5], 3, a[(n - 3)/5], 4, a[(n - 4)/5]]; Table[a[n], {n, 0, 105}]
nmax = 105; A[_] = 1; Do[A[x_] = (1 + x + x^2 + x^3 + x^4 - x^5) A[x^5] + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
nmax = 105; CoefficientList[Series[Product[(1 + x^(5^k) + x^(2 5^k) + x^(3 5^k) + x^(4 5^k) - x^(5^(k + 1))), {k, 0, Floor[Log[5, nmax]] + 1}], {x, 0, nmax}], x]
CROSSREFS
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Jun 05 2021
STATUS
approved