login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A086227 a(n)=Sum( i^k*tan(k*Pi/(4n)))/(4i) where 1<=k<=4n and (k,n)=1. 1
-1, 2, -2, 2, -4, 4, -4, 6, -4, 6, -8, 6, -8, 8, -8, 8, -12, 10, -8, 16, -12, 12, -16, 10, -12, 18, -16, 14, -16, 16, -16, 24, -16, 16, -24, 18, -20, 24, -16, 20, -32, 22, -24, 24, -24, 24, -32, 28, -20, 32, -24, 26, -36, 24, -32, 40, -28, 30, -32, 30, -32, 48, -32, 24, -48, 34, -32, 48, -32, 36, -48, 36, -36, 40, -40, 48, -48 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,2

COMMENTS

This seems to be (-1)^(n+1) times h(-4n^2) = (-1)^(n+1)*A000003(n^2), where h(k) is the class number. Verified for n <= 10^5. - Charles R Greathouse IV, Apr 28 2013

LINKS

Table of n, a(n) for n=2..78.

PROG

(PARI) a(n)=round(real(1/4/I*sum(k=1, 4*n, (I^k)*tan(Pi/4/n*if(gcd(k, n)-1, 0, k)))))

(PARI) a(n)=round(imag(sum(k=1, 4*n, if(gcd(k, n)==1, I^k*tan(k*Pi/4/n))))/4) \\ Charles R Greathouse IV, Apr 25 2013

(PARI) a(n)=my(s); for(k=1, 2*n, if(gcd(2*k-1, n)==1, s-=(-1)^k*tan((2*k-1)*Pi/4/n))); round(s/4) \\ Charles R Greathouse IV, Apr 25 2013

CROSSREFS

Sequence in context: A240321 A054861 A187324 * A079438 A123050 A113694

Adjacent sequences:  A086224 A086225 A086226 * A086228 A086229 A086230

KEYWORD

sign

AUTHOR

Benoit Cloitre, Aug 28 2003

EXTENSIONS

Definition corrected by Charles R Greathouse IV, Apr 25 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 | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified November 19 08:51 EST 2017. Contains 294923 sequences.