A110269 n mod 2 + n mod 3.
0, 2, 2, 1, 1, 3, 0, 2, 2, 1, 1, 3, 0, 2, 2, 1, 1, 3, 0, 2, 2, 1, 1, 3, 0, 2, 2, 1, 1, 3, 0, 2, 2, 1, 1, 3, 0, 2, 2, 1, 1, 3, 0, 2, 2, 1, 1, 3, 0, 2, 2, 1, 1, 3, 0, 2, 2, 1, 1, 3, 0, 2, 2, 1, 1, 3, 0, 2, 2, 1, 1, 3, 0, 2, 2, 1, 1, 3, 0, 2, 2, 1, 1, 3, 0, 2, 2, 1, 1, 3, 0, 2, 2, 1, 1, 3, 0, 2, 2, 1, 1, 3, 0, 2, 2
Offset: 0
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (-1,0,1,1).
Crossrefs
Cf. A110270.
Programs
-
Mathematica
Table[Mod[n,2]+Mod[n,3],{n,0,120}] (* or *) LinearRecurrence[{-1,0,1,1},{0,2,2,1},120] (* or *) PadRight[{},120,{0,2,2,1,1,3}] (* Harvey P. Dale, Jun 02 2019 *)
Formula
G.f.: -x*(2+4*x+3*x^2) / ( (x-1)*(1+x)*(1+x+x^2) ). - R. J. Mathar, Mar 06 2014