|
| |
|
|
A009001
|
|
Expansion of (1+x)*cos(x).
|
|
5
| |
|
|
1, 1, -1, -3, 1, 5, -1, -7, 1, 9, -1, -11, 1, 13, -1, -15, 1, 17, -1, -19, 1, 21, -1, -23, 1, 25, -1, -27, 1, 29, -1, -31, 1, 33, -1, -35, 1, 37, -1, -39, 1, 41, -1, -43, 1, 45, -1, -47, 1, 49, -1, -51, 1, 53, -1, -55, 1, 57, -1, -59, 1, 61, -1, -63, 1, 65, -1, -67, 1, 69, -1, -71, 1, 73, -1, -75, 1, 77, -1, -79, 1, 81, -1, -83, 1, 85
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 0,4
|
|
|
COMMENTS
| If signs are ignored, continued fraction for tan(1) (cf. A093178).
|
|
|
LINKS
| Harry J. Smith, Table of n, a(n) for n = 0..20000
|
|
|
FORMULA
| (-1)^(n/2) if n even, n*(-1)^((n-1)/2) if n odd.
a(n) =(n^n mod (n+1))*(-1)^[n/2] for n>0 =(-1)^n*(a(n-2)-a(n-1))-a(n-3) for n>2. - Henry Bottomley (se16(AT)btinternet.com), Oct 19 2001
G.f.: (1+x+x^2-x^3)/(1+x^2)^2. E.g.f: (1+x)*cos(x).
|
|
|
EXAMPLE
| tan(1) = 1.557407724654902230... = 1 + 1/(1 + 1/(1 + 1/(3 + 1/(1 + ...)))) [From Harry J. Smith (hjsmithh(AT)sbcglobal.net), Jun 15 2009]
|
|
|
MATHEMATICA
| Cos[ x ]*(1+x)
|
|
|
PROG
| (PARI) {a(n)=(-1)^(n\2)*if(n%2, n, 1)} /* Michael Somos Oct 16 2006 */
(PARI) { allocatemem(932245000); default(realprecision, 79000); x=contfrac(tan(1)); for (n=0, 20000, write("b009001.txt", n, " ", (-1)^(n\2)*x[n+1])); } [From Harry J. Smith (hjsmithh(AT)sbcglobal.net), Jun 15 2009]
|
|
|
CROSSREFS
| Cf. A009531, A049471 (decimal expansion of tan(1)).
Sequence in context: A147661 A155457 * A093178 A093411 A147088 A118402
Adjacent sequences: A008998 A008999 A009000 * A009002 A009003 A009004
|
|
|
KEYWORD
| sign,easy,nice
|
|
|
AUTHOR
| R. H. Hardin (rhhardin(AT)att.net), N. J. A. Sloane (njas(AT)research.att.com), Simon Plouffe, David W. Wilson (davidwwilson(AT)comcast.net)
|
|
|
EXTENSIONS
| Formula corrected Mar 15 1997 by Olivier Gerard
|
| |
|
|