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 A056594 #179 Jul 27 2025 18:54:29 %S A056594 1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0, %T A056594 -1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0, %U A056594 1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0,-1,0,1,0 %N A056594 Period 4: repeat [1,0,-1,0]; expansion of 1/(1 + x^2). %C A056594 G.f. is inverse of cyclotomic(4,x). Unsigned: A000035(n+1). %C A056594 Real part of i^n and imaginary part of i^(n+1), i=sqrt(-1). - _Reinhard Zumkeller_, Jul 22 2007 %C A056594 The BINOMIAL transform generates A009116(n); the inverse BINOMIAL transform generates (-1)^n*A009116(n). - _R. J. Mathar_, Apr 07 2008 %C A056594 a(n-1), n >= 1, is the nontrivial Dirichlet character modulo 4, called Chi_2(4;n) (the trivial one is Chi_1(4;n) given by periodic(1,0) = A000035(n)). See the Apostol reference, p. 139, the k = 4, phi(k) = 2 table. - _Wolfdieter Lang_, Jun 21 2011 %C A056594 a(n-1), n >= 1, is the character of the Dirichlet beta function. - _Daniel Forgues_, Sep 15 2012 %C A056594 a(n-1), n >= 1, is also the (strongly) multiplicative function h(n) of Theorem 5.12, p. 150, of the Niven-Zuckerman reference. See the formula section. This function h(n) can be employed to count the integer solutions to n = x^2 + y^2. See A002654 for a comment with the formula. - _Wolfdieter Lang_, Apr 19 2013 %C A056594 This sequence is duplicated in A101455 but with offset 1. - _Gary Detlefs_, Oct 04 2013 %C A056594 For n >= 2 this gives the determinant of the bipartite graph with 2*n nodes and the adjacency matrix A(n) with elements A(n;1,2) = 1 = A(n;n,n-1), and for 1 < i < n A(n;i,i+1) = 1 = A(n;i,i-1), otherwise 0. - _Wolfdieter Lang_, Jun 25 2023 %D A056594 T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1986. %D A056594 I. S. Gradstein and I. M. Ryshik, Tables of series, products, and integrals, Volume 1, Verlag Harri Deutsch, 1981. %D A056594 Ivan Niven and Herbert S. Zuckerman, An Introduction to the Theory of Numbers, New York: John Wiley (1980), p. 150. %D A056594 Jerome Spanier and Keith B. Oldham, "Atlas of Functions", Hemisphere Publishing Corp., 1987, chapter 32, equation 32:6:1 at page 300. %H A056594 Vincenzo Librandi, <a href="/A056594/b056594.txt">Table of n, a(n) for n = 0..1000</a> %H A056594 Paul Barry and Nikolaos Pantelidis, <a href="https://doi.org/10.1007/s10801-020-00993-w">On pseudo-involutions, involutions and quasi-involutions in the group of almost Riordan arrays</a>, J Algebr Comb 54, 399-423 (2021). %H A056594 PeakMath, <a href="https://www.youtube.com/watch?v=4bzSFNCiKrk">L-functions and the Langlands program (RH Saga S1E2)</a>, YouTube video (2024). %H A056594 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/KroneckerSymbol.html">Kronecker Symbol</a>. %H A056594 Wikipedia, <a href="https://en.wikipedia.org/wiki/Dirichlet_beta_function">Dirichlet beta function</a>. %H A056594 Wikipedia, <a href="https://en.wikipedia.org/wiki/Kronecker_symbol">Kronecker Symbol</a>. %H A056594 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0,-1). %H A056594 <a href="/index/Ch#Cheby">Index entries for sequences related to Chebyshev polynomials</a>. %H A056594 <a href="/index/Pol#poly_cyclo_inv">Index to sequences related to inverse of cyclotomic polynomials</a>. %F A056594 G.f.: 1/(1+x^2). %F A056594 E.g.f.: cos(x). %F A056594 a(n) = (1/2)*((-i)^n + i^n), where i = sqrt(-1). - _Mitch Harris_, Apr 19 2005 %F A056594 a(n) = (1/2)*((-1)^(n+floor(n/2)) + (-1)^floor(n/2)). %F A056594 Recurrence: a(n)=a(n-4), a(0)=1, a(1)=0, a(2)=-1, a(3)=0. %F A056594 a(n) = T(n, 0) = A053120(n, 0); T(n, x) Chebyshev polynomials of the first kind. - _Wolfdieter Lang_, Aug 21 2009 %F A056594 a(n) = S(n, 0) = A049310(n, 0); S(n, x) := U(n, x/2), Chebyshev polynomials of 2nd kind. %F A056594 Sum_{k>=0} a(k)/(k+1) = Pi/4. - _Jaume Oliver Lafont_, Mar 30 2010 %F A056594 a(n) = Sum_{k=0..n} A101950(n,k)*(-1)^k. - _Philippe Deléham_, Feb 10 2012 %F A056594 a(n) = (1/2)*(1 + (-1)^n)*(-1)^(n/2). - _Bruno Berselli_, Mar 13 2012 %F A056594 a(0) = 1, a(n-1) = 0 if n is even, a(n-1) = Product_{j=1..m} (-1)^(e_j*(p_j-1)/2) if the odd n-1 = p_1^(e_1)*p_2^(e_2)*...*p_m^(e_m) with distinct odd primes p_j, j=1..m. See the function h(n) of Theorem 5.12 of the Niven-Zuckerman reference. - _Wolfdieter Lang_, Apr 19 2013 %F A056594 a(n) = (-4/(n+1)), n >= 0, where (k/n) is the Kronecker symbol. See the Eric Weisstein and Wikipedia links. Thanks to Wesley Ivan Hurt. - _Wolfdieter Lang_, May 31 2013 %F A056594 a(n) = R(n,0)/2 with the row polynomials R of A127672. This follows from the product of the zeros of R, and the formula Product_{k=0..n-1} 2*cos((2*k+1)*Pi/(2*n)) = (1 + (-1)^n)*(-1)^(n/2), n >= 1 (see the Gradstein and Ryshik reference, p. 63, 1.396 4., with x = sqrt(-1)). - _Wolfdieter Lang_, Oct 21 2013 %F A056594 a(n) = Sum_{k=0..n} i^(k*(k+1)), where i=sqrt(-1). - _Bruno Berselli_, Mar 11 2015 %F A056594 Dirichlet g.f. of a(n) shifted right: L(chi_2(4),s) = beta(s) = (1-2^(-s))*(d.g.f. of A034947), see comments by Lang and Forgues. - _Ralf Stephan_, Mar 27 2015 %F A056594 a(n) = cos(3*n*Pi/2). - _Ridouane Oudra_, Sep 29 2024 %e A056594 With a(n-1) = h(n) of Niven-Zuckerman: a(62) = h(63) = h(3^2*7^1) = (-1)^(2*1)*(-1)^(1*3) = -1 = h(3)^2*h(7) = a(2)^2*a(6) = (-1)^2*(-1) = -1. - _Wolfdieter Lang_, Apr 19 2013 %p A056594 A056594 := n->(1-irem(n,2))*(-1)^iquo(n,2); # _Peter Luschny_, Jul 27 2011 %t A056594 CoefficientList[Series[1/(1 + x^2), {x, 0, 50}], x] %t A056594 a[n_]:= KroneckerSymbol[-4,n+1];Table[a[n],{n,0,93}] (* Thanks to _Jean-François Alcover_. - _Wolfdieter Lang_, May 31 2013 *) %t A056594 CoefficientList[Series[1/Cyclotomic[4, x], {x, 0, 100}], x] (* _Vincenzo Librandi_, Apr 03 2014 *) %o A056594 (PARI) {a(n) = real( I^n )} %o A056594 (PARI) {a(n) = kronecker(-4, n+1) } %o A056594 (Magma) &cat[ [1, 0, -1, 0]: n in [0..23] ]; // _Bruno Berselli_, Feb 08 2011 %o A056594 (Maxima) A056594(n) := block( %o A056594 [1,0,-1,0][1+mod(n,4)] %o A056594 )$ /* _R. J. Mathar_, Mar 19 2012 */ %o A056594 (Python) %o A056594 def A056594(n): return (1,0,-1,0)[n&3] # _Chai Wah Wu_, Sep 23 2023 %Y A056594 Cf. A049310, A074661, A131852, A002654, A146559 (binomial transform). %K A056594 sign,easy %O A056594 0,1 %A A056594 _Wolfdieter Lang_, Aug 04 2000