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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A010702 Period 2: repeat (3,4). 9
3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

Continued fraction expansion of A176102. - R. J. Mathar, Mar 08 2012

LINKS

Matthew House, Table of n, a(n) for n = 0..10000

Index entries for linear recurrences with constant coefficients, signature (0,1).

FORMULA

a(n) = -1/2*(-1)^n+7/2 = 4*(n mod 2) + 3*[(n+1) mod 2]. - Paolo P. Lava, Oct 20 2006

G.f.: (3+4*x)/(1-x^2). - Jaume Oliver Lafont, Mar 20 2009

a(n) = floor((n+1)*7/2) - floor((n)*7/2). - Hailey R. Olafson, Jul 23 2014

a(n) = 3 + (n mod 2) = 4 - ((n+1) mod 2). - Wesley Ivan Hurt, Jul 24 2014

MAPLE

A010702:=n->3+(n mod 2): seq(A010702(n), n=0..100); # Wesley Ivan Hurt, Jul 24 2014

MATHEMATICA

3 + Mod[Range[0, 100], 2] (* Wesley Ivan Hurt, Jul 24 2014 *)

PadRight[{}, 100, {3, 4}] (* Vincenzo Librandi, Aug 01 2015 *)

PROG

(PARI) a(n)=3+n%2 \\ Charles R Greathouse IV, Dec 21 2011

(Haskell)

a010702 = (+ 3) . (`mod` 2)

a010702_list = cycle [3, 4]  -- Reinhard Zumkeller, Jul 05 2012

(MAGMA) [3 + (n mod 2) : n in [0..100]]; // Wesley Ivan Hurt, Jul 24 2014

(MAGMA) &cat[[3, 4]: n in [0..50]]; // Vincenzo Librandi, Aug 01 2015

CROSSREFS

Cf. A047355 (partial sums).

Sequence in context: A083021 A102745 A108026 * A095925 A242744 A066783

Adjacent sequences:  A010699 A010700 A010701 * A010703 A010704 A010705

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 18 07:10 EDT 2019. Contains 325134 sequences. (Running on oeis4.)