This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A057078 #103 Sep 08 2024 10:02:45 %S A057078 1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0, %T A057078 -1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1, %U A057078 0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1,1,0,-1 %N A057078 Periodic sequence 1,0,-1,...; expansion of (1+x)/(1+x+x^2). %C A057078 Partial sums of signed sequence is shifted unsigned one: |a(n+2)| = A011655(n+1). %C A057078 With interpolated zeros, a(n) = sin(5*Pi*n/6 + Pi/3)/sqrt(3) + cos(Pi*n/6 + Pi/6)/sqrt(3); this gives the diagonal sums of the Riordan array (1-x^2, x(1-x^2)). - _Paul Barry_, Feb 02 2005 %C A057078 From _Tom Copeland_, Nov 02 2014: (Start) %C A057078 With a shift and a sign change the o.g.f. of this array becomes the compositional inverse of the shifted Motzkin or Riordan numbers A005043, %C A057078 (x - x^2) / (1 - x + x^2) = x*(1-x) / (1 - x*(1-x)) = x*(1-x) + [x*(1-x)]^2 + ... . Expanding each term of this series and arranging like powers of x in columns gives skewed rows of the Pascal triangle and reading along the columns gives (mod-signs and indexing) A011973, A169803, and A115139 (see also A091867, A092865, A098925, and A102426 for these term-by-term expansions and A030528). (End) %H A057078 Winston de Greef, <a href="/A057078/b057078.txt">Table of n, a(n) for n = 0..10000</a> %H A057078 Ralph E. Griswold, <a href="https://www2.cs.arizona.edu/patterns/sequences/">Shaft Sequences</a> %H A057078 <a href="/index/Ch#Cheby">Index entries for sequences related to Chebyshev polynomials.</a> %H A057078 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (-1,-1). %F A057078 a(n) = S(n, -1) + S(n - 1, -1) = S(2*n, 1); S(n, x) := U(n, x/2), Chebyshev polynomials of 2nd kind, A049310. S(n, -1) = A049347(n). S(n, 1) = A010892(n). %F A057078 From Mario Catalani (mario.catalani(AT)unito.it), Jan 08 2003: (Start) %F A057078 a(n) = (1/2)*((-1)^floor(2*n/3) + (-1)^floor((2*n+1)/3)). %F A057078 a(n) = -a(n-1) - a(n-2). %F A057078 a(n) = A061347(n) - A049347(n+2). (End) %F A057078 a(n) = Sum_{k=0..n} binomial(n+k, 2k)*(-1)^(n-k) = Sum_{k=0..floor((n+1)/2)} binomial(n+1-k, k)*(-1)^(n-k). - Mario Catalani (mario.catalani(AT)unito.it), Aug 20 2003 %F A057078 Binomial transform is A010892. a(n) = 2*sqrt(3)*sin(2*Pi*n/3 + Pi/3)/3. - _Paul Barry_, Sep 13 2003 %F A057078 a(n) = cos(2*Pi*n/3) + sin(2*Pi*n/3)/sqrt(3). - _Paul Barry_, Oct 27 2004 %F A057078 a(n) = Sum_{k=0..n} (-1)^A010060(2n-2k)*(binomial(2n-k, k) mod 2). - _Paul Barry_, Dec 11 2004 %F A057078 a(n) = (4/3)*(|sin(Pi*(n-2)/3)| - |sin(Pi*n/3)|)*|sin(Pi*(n-1)/3)|. - _Hieronymus Fischer_, Jun 27 2007 %F A057078 a(n) = 1 - (n mod 3) = 1 + 3*floor(n/3) - n. - _Hieronymus Fischer_, Jun 27 2007 %F A057078 a(n) = 1 - A010872(n) = 1 + 3*A002264(n) - n. - _Hieronymus Fischer_, Jun 27 2007 %F A057078 Euler transform of length 3 sequence [0, -1, 1]. - _Michael Somos_, Oct 15 2008 %F A057078 a(n) = a(n-1)^2 - a(n-2)^2 with a(0) = 1, a(1) = 0. - _Francesco Daddi_, Aug 02 2011 %F A057078 a(n) = A049347(n) + A049347(n-1). - _R. J. Mathar_, Jun 26 2013 %F A057078 E.g.f.: exp(-x/2)*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2))/3. - _Stefano Spezia_, May 16 2023 %F A057078 a(n) = -a(-1-n) for all n in Z. - _Michael Somos_, Feb 20 2024 %F A057078 From _Peter Bala_, Sep 08 2024: (Start) %F A057078 G.f. A(x) satisfies A(x) = (1 + x)*(1 - x*A(x)). %F A057078 1/x * series_reversion(x/A(x)) = the g.f of A364374. (End) %e A057078 G.f. = 1 - x^2 + x^3 - x^5 + x^6 - x^8 + x^9 - x^11 + x^12 - x^14 + x^15 + ... %p A057078 A057078:=n->1-(n mod 3); seq(A057078(n), n=0..100); # _Wesley Ivan Hurt_, Dec 06 2013 %t A057078 a[n_] := {1, 0, -1}[[Mod[n, 3] + 1]] (* _Jean-François Alcover_, Jul 05 2013 *) %t A057078 CoefficientList[Series[(1 + x) / (1 + x + x^2), {x, 0, 40}], x] (* _Vincenzo Librandi_, Nov 03 2014 *) %t A057078 LinearRecurrence[{-1, -1},{1, 0},90] (* _Ray Chandler_, Sep 15 2015 *) %o A057078 (PARI) {a(n) = [1, 0, -1][n%3 + 1]}; /* _Michael Somos_, Oct 15 2008 */ %o A057078 (Haskell) %o A057078 a057078 = (1 -) . (`mod` 3) -- _Reinhard Zumkeller_, Mar 22 2013 %o A057078 (Sage) %o A057078 def A057078(): %o A057078 x, y = -1, 0 %o A057078 while True: %o A057078 yield -x %o A057078 x, y = y, -x -y %o A057078 a = A057078(); [next(a) for i in range(40)] # _Peter Luschny_, Jul 11 2013 %Y A057078 Cf. A049310, A010892, A011655. %Y A057078 A049347(n) = a(-n). %Y A057078 Cf. A005043, A011973, A169803, A115139, A091867, A092865, A098925, A102426, A030528. %Y A057078 Cf. A002264, A010060, A010872, A049347, A061347, A364374. %K A057078 easy,sign %O A057078 0,1 %A A057078 _Wolfdieter Lang_, Aug 04 2000