This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A040001 1 followed by {1, 2} repeated. 50
 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS Continued fraction for sqrt(3). Also coefficient of the highest power of q in the expansion of the polynomial nu(n) defined by: nu(0)=1, nu(1)=b and for n>=2, nu(n)=b*nu(n-1)+lambda*(n-1)_q*nu(n-2) with (b,lambda)=(1,1), where (n)_q=(1+q+...+q^(n-1)) and q is a root of unity. - Y. Kelly Itakura (yitkr(AT)mta.ca), Aug 21 2002 nu(0)=1 nu(1)=1; nu(2)=2; nu(3)=3+q; nu(4)=5+3q+2q^2; nu(5)=8+7q+6q^2+4q^3+q^4; nu(6)=13+15q+16q^2+14q^3+11q^4+5q^5+2q^6. From Jaroslav Krizek, May 28 2010: (Start) a(n) = denominators of arithmetic means of the first n positive integers for n >= 1. See A026741(n+1) or A145051(n) - denominators of arithmetic means of the first n positive integers. (End) From R. J. Mathar, Feb 16 2011: (Start) This is a prototype of multiplicative sequences defined by a(p^e)=1 for odd primes p, and a(2^e)=c with some constant c, here c=2. They have Dirichlet generating functions (1+(c-1)/2^s)*zeta(s). Examples are A153284, A176040 (c=3), A040005 (c=4), A021070, A176260 (c=5), A040011, A176355 (c=6), A176415 (c=7), A040019, A021059 (c=8), A040029 (c=10), A040041 (c=12). (End) a(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = A000325(k) for k = 0, 1, ..., n. - Michael Somos, May 12 2012 For n > 0: denominators of row sums of the triangular enumeration of rational numbers A226314(n,k) / A054531(n,k), 1 <= k <= n; see A226555 for numerators. - Reinhard Zumkeller, Jun 10 2013 LINKS Harry J. Smith, Table of n, a(n) for n = 0..20000 M. Beattie, S. Dăscălescu and S. Raianu, Lifting of Nichols Algebras of Type B_2, arXiv:math/0204075 [math.QA], 2002. Ashok Kumar Gupta and Ashok Kumar Mittal, Bifurcating continued fractions, arXiv:math/0002227 [math.GM] (2000). Eric Weisstein's World of Mathematics, Square Root Eric Weisstein's World of Mathematics, Theodorus's Constant G. Xiao, Contfrac Index entries for linear recurrences with constant coefficients, signature (0,1). FORMULA Multiplicative with a(p^e) = 2 if p even; 1 if p odd. - David W. Wilson, Aug 01 2001 G.f.: (1 + x + x^2) / (1 - x^2). E.g.f.: (3*exp(x)-2*exp(0)+exp(-x))/2. - Paul Barry, Apr 27 2003 a(n) = (3-2*0^n +(-1)^n)/2. a(-n)=a(n). a(2n+1)=1, a(2n)=2, n nonzero. a(n) = sum{k=0..n, F(n-k+1)*(-2+(1+(-1)^k)/2+C(2, k)+0^k)}. - Paul Barry, Jun 22 2007 Row sums of triangle A133566. - Gary W. Adamson, Sep 16 2007 a(n) = 3/2+(1/2)*(-1)^n-[C(2*n,n) mod 2], with n>=0. - Paolo P. Lava, Nov 27 2007 Euler transform of length 3 sequence [ 1, 1, -1]. - Michael Somos, Aug 04 2009 Moebius transform is length 2 sequence [ 1, 1]. - Michael Somos, Aug 04 2009 a(n) = sign(n) + ((n+1) mod 2) = 1 + sign(n) - (n mod 2). - Wesley Ivan Hurt, Dec 13 2013 EXAMPLE 1.732050807568877293527446341... = 1 + 1/(1 + 1/(2 + 1/(1 + 1/(2 + ...)))) 1 + x + 2*x^2 + x^3 + 2*x^4 + x^5 + 2*x^6 + x^7 + 2*x^8 + x^9 + ... MAPLE Digits := 100: convert(evalf(sqrt(N)), confrac, 90, 'cvgts'): MATHEMATICA ContinuedFraction[Sqrt, 300] (* Vladimir Joseph Stephan Orlovsky, Mar 04 2011 *) PadRight[{1}, 120, {2, 1}] (* Harvey P. Dale, Nov 26 2015 *) PROG (PARI) {a(n) = 2 - (n==0) - (n%2)} /* Michael Somos, Jun 11 2003 */ (PARI) { allocatemem(932245000); default(realprecision, 12000); x=contfrac(sqrt(3)); for (n=0, 20000, write("b040001.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 01 2009 (Haskell) a040001 0 = 1; a040001 n = 2 - mod n 2 a040001_list = 1 : cycle [1, 2]  -- Reinhard Zumkeller, Apr 16 2015 CROSSREFS Cf. A000034, A002194, A133566. Sequence in context: A168361 A107393 A000034 * A134451 A229217 A167965 Adjacent sequences:  A039998 A039999 A040000 * A040002 A040003 A040004 KEYWORD nonn,cofr,easy,mult,frac AUTHOR 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
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 15 17:43 EDT 2019. Contains 324142 sequences. (Running on oeis4.)