login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A230075 Period 8: repeat [2, 1, 0, 1, -2, -1, 0, -1]. 4
2, 1, 0, 1, -2, -1, 0, -1, 2, 1, 0, 1, -2, -1, 0, -1, 2, 1, 0, 1, -2, -1, 0, -1, 2, 1, 0, 1, -2, -1, 0, -1, 2, 1, 0, 1, -2, -1, 0, -1, 2, 1, 0, 1, -2, -1, 0, -1, 2, 1, 0, 1, -2, -1, 0, -1, 2, 1, 0, 1, -2, -1, 0, -1, 2, 1, 0, 1, -2, -1, 0, -1, 2, 1, 0, 1, -2, -1, 0, -1, 2, 1, 0, 1, -2, -1, 0, -1, 2, 1, 0, 1, -2, -1, 0, -1, 2, 1, 0, 1, -2, -1, 0, -1, 2, 1, 0, 1, -2, -1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
This is A118825(n+5), n >= 0. (The g.f. given there is not quite correct, because then a(0) = 0 but it should be 1.)
This sequence a(n), n >= 2, is product(2*cos((2*l+1)*Pi/2), l=0..floor((n-2)/2)). This is the unrestricted product which appears in the formula for C(n, 0) with the minimal polynomial C of rho(n):=2*cos(Pi/n) (see A187360), the length ratio (smallest diagonal)/side in the regular n-gon. The restriction gcd(2*l+1, n) = 1 is ineffective for n = 2^k, k>=1, and for n = odd prime p. Therefore norm(rho(n)) = (-1)^delta(n)*C(n, 0) with delta(n) (see A055034) the degree of C, can be computed from the present sequence for these two cases.
LINKS
FORMULA
O.g.f.: (2 + x + x^3) / (1 + x^4).
a(n) = 2*(-1)^(n/4) if n == 0 (mod 4); a(n) == 0 if n == 2 (mod 4); a(n) = (-1)^((n-1)/4) if n == 1 (mod 4); a(n) == (-1)^((n-3)/4) if n == 3 (mod 4).
a(n) = Product_{l=0..floor((n-2)/2)} 2*cos((2*l+1)*Pi/2). Proof via the product formulas for the four (mod 4) cases; see the comments for subsequences like A033999, and the product of the zeros of Chebyshev S-polynomials (A049310) from S(n-1, 0) which is known.
a(n) = sqrt((n+2)^2 mod 8)*(-1)^floor(n/4). - Wesley Ivan Hurt, Jan 01 2014
a(n) = (cos(Pi*(2*n+q-r-s)/8)-cos(Pi*(-2*n+q+r-s)/8)+sin(Pi*(-2*n+q-r+s)/8)+3*sin(Pi*(2*n+q+r+s)/8))/2 where q = 1+(-1)^n, r = 2*sin(n*Pi/2) and s = 2*cos(n*Pi/2). - Wesley Ivan Hurt, Oct 06 2018
MAPLE
A230075:=n->sqrt((n+2)^2 mod 8)*(-1)^floor(n/4); seq(A230075(n), n=0..100); # Wesley Ivan Hurt, Jan 01 2014
MATHEMATICA
Table[Sqrt[Mod[(n+2)^2, 8]](-1)^Floor[n/4], {n, 0, 100}] (* Wesley Ivan Hurt, Jan 01 2014 *)
PROG
(PARI) a(n)=[2, 1, 0, 1, -2, -1, 0, -1][n%8+1] \\ Charles R Greathouse IV, Jul 17 2016
(GAP) Flat(List([1..15], n->[2, 1, 0, 1, -2, -1, 0, -1])); # Muniru A Asiru, Oct 07 2018
(Magma) &cat [[2, 1, 0, 1, -2, -1, 0, -1]^^20]; // Wesley Ivan Hurt, Oct 10 2018
CROSSREFS
Sequence in context: A098178 A118822 A230074 * A334947 A334540 A334462
KEYWORD
sign,easy
AUTHOR
Wolfdieter Lang, Oct 23 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 18:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)