This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A109007 a(n) = gcd(n,3). 19
 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,1 COMMENTS For n>1: a(n) = GCD of the n-th and (n+2)-th triangular numbers = A050873(A000217(n+2), A000217(n)). - Reinhard Zumkeller, May 28 2007 From Klaus Brockhaus, May 24 2010: (Start) Continued fraction expansion of (3+sqrt(17))/2. Decimal expansion of 311/999. (End) LINKS Index entries for linear recurrences with constant coefficients, signature (0,0,1). FORMULA a(n) = 1 + 2*[3|n] = 1 + 2(1 + 2*cos(2*n*Pi/3))/3, where [x|y] = 1 when x divides y, 0 otherwise. a(n) = a(n-3) for n>2. Multiplicative with a(p^e, 3) = gcd(p^e, 3). - David W. Wilson, Jun 12 2005 O.g.f.: -(3+x+x^2)/((x-1)*(x^2+x+1)). - R. J. Mathar, Nov 24 2007 Dirichlet g.f. zeta(s)*(1+2/3^s). - R. J. Mathar, Apr 08 2011 a(n) = 2*floor(((n-1) mod 3)/2) + 1. - Gary Detlefs, Dec 28 2011 a(n) = 3^(1 - sgn(n mod 3)). - Wesley Ivan Hurt, Jul 24 2016 a(n) = 3/(1 + 2*((n^2) mod 3)). - Timothy Hopper, Feb 25 2017 a(n) = (5 + 4*cos(2*n*Pi/3))/3. - Wesley Ivan Hurt, Oct 04 2018 MAPLE A109007:=n->gcd(n, 3): seq(A109007(n), n=0..100); # Wesley Ivan Hurt, Jul 24 2016 MATHEMATICA GCD[Range[0, 100], 3] (* or *) PadRight[{}, 110, {3, 1, 1}] (* Harvey P. Dale, Jun 28 2015 *) PROG (PARI) a(n)=gcd(n, 3) \\ Charles R Greathouse IV, Sep 24 2015 (MAGMA) [Gcd(n, 3) : n in [0..100]]; // Wesley Ivan Hurt, Jul 24 2016 CROSSREFS Cf. A000217, A026741, A050873, A109004, A130334. Cf. A178255 (decimal expansion of (3+sqrt(17))/2). - Klaus Brockhaus, May 24 2010 Sequence in context: A098094 A087283 A111625 * A132951 A228925 A230405 Adjacent sequences:  A109004 A109005 A109006 * A109008 A109009 A109010 KEYWORD nonn,easy,mult 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 October 15 10:46 EDT 2019. Contains 328026 sequences. (Running on oeis4.)