A010693 Periodic sequence: Repeat 2,3.
2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3
Offset: 0
Links
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 466
- G. Richomme, K. Saari, and L. Q. Zamboni, Abelian complexity in minimal subshifts, J. London Math. Soc. 83(1) (2011) 79-95.
- G. Richomme, K. Saari, and L. Q. Zamboni, Abelian complexity in minimal subshifts, arXiv:0911.2914 [math.CO], 2009.
- Index entries for linear recurrences with constant coefficients, signature (0,1).
Programs
-
Haskell
a010693 = (+ 2) . (`mod` 2) -- Reinhard Zumkeller, Nov 27 2012 a010693_list = cycle [2,3] -- Reinhard Zumkeller, Mar 29 2012
-
Magma
[2 + (n mod 2) : n in [0..100]]; // Wesley Ivan Hurt, Jul 24 2014
-
Maple
A010693:=n->2+(n mod 2): seq(A010693(n), n=0..100); # Wesley Ivan Hurt, Jul 24 2014
-
Mathematica
Table[5/2 - (-1)^n/2, {n, 0, 100}] or a = {}; Do[b = First[First[FactorInteger[n!! ]]]; AppendTo[a, b], {n, 2, 1000}]; a (* Artur Jasinski, Apr 21 2008 *) 2 + Mod[Range[0, 100], 2] (* Wesley Ivan Hurt, Jul 24 2014 *) PadRight[{},120,{2,3}] (* Harvey P. Dale, Jan 20 2023 *)
-
PARI
a(n)=3 - (n+1)%2 \\ Charles R Greathouse IV, May 09 2016
Formula
a(n) = 5/2 - ((-1)^n)/2.
From Jaume Oliver Lafont, Mar 20 2009: (Start)
G.f.: (2+3*x)/(1-x^2).
Linear recurrence: a(0)=2, a(1)=3, a(n)=a(n-2) for n>=2. (End)
a(n) = floor((n+1)*5/2) - floor((n)*5/2). - Hailey R. Olafson, Jul 23 2014
a(n) = 3 - ((n+1) mod 2). - Wesley Ivan Hurt, Jul 24 2014
E.g.f.: 2*cosh(x) + 3*sinh(x). - Stefano Spezia, Aug 04 2025
Extensions
Definition rewritten by Bruno Berselli, Sep 30 2011
Comments