A102283 Period 3: repeat [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, -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, -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, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1
Offset: 0
Examples
G.f. = x - x^2 + x^4 - x^5 + x^7 - x^8 + x^10 - x^11 + ... - _Michael Somos_, Nov 27 2019
References
- M. N. Huxley, Area, Lattice Points and Exponential Sums, Oxford, 1996; p. 236.
- L. B. W. Jolley, Summation of Series, Dover Publications (1961).
- Paulo Ribenboim, My Numbers, My Friends: Popular Lectures on Number Theory, Springer-Verlag, NY, 2000, p. 6.
Links
- Clark Kimberling, Strong divisibility sequences and some conjectures, Fib. Quart., 17 (1979), 13-17.
- R. J. Mathar, Table of Dirichlet L-series.., arXiv:1008.2547 [math.NT], 2010-2015, Table 2, Table 22 for m=3, r=2.
- D. Tasci, On Quadrapell Numbers and Quadrapell Polynomials, Hacettepe J. Math. Stat., 38 (3) (2009), 265-275.
- Eric Weisstein's World of Mathematics, Kronecker Symbol.
- Wikipedia, Kronecker Symbol.
- Index entries for linear recurrences with constant coefficients, signature (-1,-1).
Programs
-
Magma
&cat [[0, 1, -1]^^30]; // Wesley Ivan Hurt, Jul 02 2016
-
Maple
ch:=n-> if n mod 3 = 0 then 0; elif n mod 3 = 1 then 1; else -1; fi; seq(op([0, 1, -1]), n=1..50); # Wesley Ivan Hurt, Jul 02 2016
-
Mathematica
Table[JacobiSymbol[n, 3], {n, 0, 99}] (* Alonso del Arte, Feb 06 2013 *) Table[KroneckerSymbol[-3, n], {n, 0, 99}] (* Wolfdieter Lang, May 30 2013 *) PadRight[{}, 100, {0, 1, -1}] (* Wesley Ivan Hurt, Jul 02 2016 *) a[ n_] := {1, -1, 0}[[Mod[n, 3, 1]]]; (* Michael Somos, Nov 27 2019 *)
-
PARI
a(n)=([0,1; -1,-1]^n*[0;1])[1,1] \\ Charles R Greathouse IV, Jan 14 2017
-
PARI
{a(n) = [0, 1, -1][n%3 + 1]}; /* Michael Somos, Nov 27 2019 */
-
Python
def A102283(n): return (0,1,-1)[n%3] # Chai Wah Wu, Sep 16 2023
-
Sage
def A102283(): x, y = 0, -1 while True: yield -x x, y = y, -x -y a = A102283(); [next(a) for i in range(40)] # Peter Luschny, Jul 11 2013
Formula
a(n) = A049347(n-1).
a(n) = -a(n-1) - a(n-2); a(0) = 0, a(1) = 1. G.f.: x/(1+x+x^2). - Philippe Deléham, Nov 03 2008
a(n) = -2*sin(4*Pi*n/3)/sqrt(3) = 2*sin(8*Pi*n/3)/sqrt(3). - Jaume Oliver Lafont, Dec 05 2008
a(n) = 2*sin(2*Pi*n/3)/sqrt(3). - Roman Witula, Jul 31 2012
a(n) = Legendre(n, 3), the Legendre symbol for p = 3. - Alonso del Arte, Feb 06 2013
a(n) = (-3/n), where (k/n) is the Kronecker symbol. See the Eric Weisstein and Wikipedia links. - Wolfdieter Lang, May 29 2013
Dirichlet g.f.: L(chi_2(3),s), with chi_2(3) the nontrivial Dirichlet character modulo 3. - Ralf Stephan, Mar 27 2015
a(n) = a(n-3) for n > 2. - Wesley Ivan Hurt, Jul 02 2016
E.g.f.: 2*sin(sqrt(3)*x/2)*exp(-x/2)/sqrt(3). - Ilya Gutkovskiy, Jul 02 2016
a(n) = H(2*n, 1, 1/2) for n > 0 where H(n, a, b) = hypergeom([a - n/2, b - n/2], [1 - n], 4). - Peter Luschny, Sep 03 2019
Euler transform of length 3 sequence [-1, 0, 1]. - Michael Somos, Nov 27 2019
a(n) = n - 3*floor((n+1)/3). - Wolfdieter Lang, Oct 07 2021
Comments