|
| |
|
|
A093178
|
|
If n is even then 1, otherwise n.
|
|
12
| |
|
|
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
| Continued fraction expansion for tan(1).
|
|
|
LINKS
| Harry J. Smith, Table of n, a(n) for n = 0..20000
Index entries for two-way infinite sequences
S. Plouffe, A Search for a mathematical expression for mass ratios using a large database. page 3.
G. Xiao, Contfrac
Index entries for continued fractions for constants
|
|
|
FORMULA
| G.f.: (1+x-x^2+x^3)/(1-x^2)^2. a(-n)=(-1)^n*a(n).
(1/2) [ 1 + n + (1-n)*(-1)^n ]. - R. Stephan, Dec 02 2004
n^n mod (n+1) for n > 0. - Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Apr 18 2004
Satisfies a(0) = 1, a(n+1) = a(n) + n if a(n) < n else a(n+1) = a(n)/n. - Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Oct 29 2002
a(n)=((n+1)+(1-n)(-1)^n)/2 and have e.g.f. (1+x)cosh(x). - Paul Barry (pbarry(AT)wit.ie), Apr 09 2003
a(n)=C(n,2*floor(n/2)); - Paul Barry (pbarry(AT)wit.ie), Dec 28 2006
a(n)=C(n,(n mod 2)). - Paolo P. Lava (paoloplava(AT)gmail.com), Aug 29 2007
Starting (1, 1, 3, 1, 5, 1, 7,...) = A133080^(-1) * [1,2,3,...]. - Gary W. Adamson (qntmpkt(AT)yahoo.com), Sep 08 2007
Contribution from Johannes W. Meijer (meijgia(AT)hotmail.com), Jun 18 2009: (Start)
a(n) = denom(b(n+2)/b(n+1)) with b(n) = product((2*n-3-2*k), k=0..floor(n/2-1)).
(End)
|
|
|
EXAMPLE
| 1.557407724654902230506974807... = 1 + 1/(1 + 1/(1 + 1/(3 + 1/(1 + ...))))
|
|
|
MATHEMATICA
| Join[{1}, Riffle[Range[1, 85, 2], 1]] (* or *) Array[If[EvenQ[#], 1, #]&, 87, 0] (* From Harvey P. Dale, Nov 23 2011 *)
|
|
|
PROG
| (PARI) a(n)=if(n%2, n, 1)
(PARI) { allocatemem(932245000); default(realprecision, 79000); x=contfrac(tan(1)); for (n=0, 20000, write("b093178.txt", n, " ", x[n+1])); } [From Harry J. Smith (hjsmithh(AT)sbcglobal.net), Jun 13 2009]
|
|
|
CROSSREFS
| Equals |A009001(n)|.
Cf. A133080, A049471 (decimal expansion), A009001, A161738.
Sequence in context: A147661 A155457 A009001 * A093411 A147088 A118402
Adjacent sequences: A093175 A093176 A093177 * A093179 A093180 A093181
|
|
|
KEYWORD
| nonn
|
|
|
AUTHOR
| Michael Somos, Mar 27 2004
|
| |
|
|