A267027 "Polyrhythmic sequence" P(3,4): numbers congruent to 1 mod 3 (A016777) or 1 mod 4 (A016813).
1, 4, 5, 7, 9, 10, 13, 16, 17, 19, 21, 22, 25, 28, 29, 31, 33, 34, 37, 40, 41, 43, 45, 46, 49, 52, 53, 55, 57, 58, 61, 64, 65, 67, 69, 70, 73, 76, 77, 79, 81, 82, 85, 88, 89, 91, 93, 94, 97, 100, 101, 103, 105, 106, 109, 112, 113, 115, 117, 118, 121, 124, 125
Offset: 1
A110568 Period 6: repeat [1, 0, 2, 2, 0, 1].
1, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1, 1, 0, 2
Offset: 0
Comments
Permutation of {0, 1, 2}, followed by its reversal, repeated.
Links
- Index entries for linear recurrences with constant coefficients, signature (1,-1,1,-1,1).
Programs
-
Magma
&cat [[1, 0, 2, 2, 0, 1]^^30]; // Wesley Ivan Hurt, Jun 28 2016
-
Maple
A110568:=n->[1, 0, 2, 2, 0, 1][(n mod 6)+1]: seq(A110568(n), n=0..100); # Wesley Ivan Hurt, Jun 28 2016
-
Mathematica
Mod[#,3]&/@CoefficientList[Series[(1-x)/(1-x-2x^2),{x,0,100}],x] (* Harvey P. Dale, Mar 30 2011 *) PadRight[{}, 100, {1, 0, 2, 2, 0, 1}] (* Wesley Ivan Hurt, Jun 28 2016 *) LinearRecurrence[{1,-1,1,-1,1},{1,0,2,2,0},100] (* Harvey P. Dale, Apr 03 2019 *)
-
PARI
x='x+O('x^50); Vec((1-x+3*x^2-x^3+x^4)/(1-x+x^2-x^3+x^4-x^5)) \\ G. C. Greubel, Aug 31 2017
Formula
a(n) = A078008(n) mod 3.
G.f.: (1-x+3*x^2-x^3+x^4) / (1-x+x^2-x^3+x^4-x^5).
a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5) for n>4.
a(n) = 1 + cos(2*Pi*n/3)/2 - sqrt(3)*sin(2*Pi*n/3)/2 - cos(Pi*n/3)/2 + sqrt(3)*sin(Pi*n/3)/6.
a(n) = a(n-6) for n > 5. - Wesley Ivan Hurt, Jun 28 2016
a(n) = ((n-1)*(-1)^(n-1) mod 3). - Wesley Ivan Hurt, Jan 07 2021
Extensions
Name changed by Wesley Ivan Hurt, Jun 28 2016
Comments
Examples
Links
Crossrefs
Programs
Magma
Maple
Mathematica
PARI
Formula