[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A010702 Period 2: repeat (3,4). 10
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
Also decimal expansion of 34/99. - Nicolas Bělohoubek, Nov 12 2021
LINKS
FORMULA
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
From Nicolas Bělohoubek, Nov 12 2021: (Start)
a(n) = 12/a(n-1). See also A010696.
a(n) = 7 - a(n-1). See also A010695. (End)
a(n) = (7-(-1)^n)/2. - Aaron J Grech, Jul 28 2024
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
(Python)
def A010702(n): return 3 + (n & 1) # Chai Wah Wu, May 25 2022
CROSSREFS
Cf. A047355 (partial sums), A176102.
Sequence in context: A083021 A102745 A108026 * A345439 A095925 A242744
KEYWORD
nonn,easy
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 29 21:13 EDT 2024. Contains 375518 sequences. (Running on oeis4.)