A119910 Period 6: repeat [1, 3, 2, -1, -3, -2].
1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2, 1, 3, 2, -1, -3, -2
Offset: 1
Examples
a(32)=?: 32%7=4, therefore a(32)=-1. Let us test the divisibility of 342 with the series: Take 1 from the sequence, multiply it by 2, the product is 2, take 3 from the sequence, multiply it by 4, the product is 12, take 2 from the sequence, multiply it by 3, the product is 6, the sum of the products is 2 + 12 + 6 = 20, because 20 is not divisible by 7, therefore 342 will also not be.
Links
- Tanya Khovanova, Recursive Sequences
- Index entries for linear recurrences with constant coefficients, signature (1,-1).
Programs
-
Magma
&cat[[1, 3, 2, -1, -3, -2]^^20]; // Wesley Ivan Hurt, Jun 19 2016
-
Maple
A119910:=n->[1, 3, 2, -1, -3, -2][(n mod 6)+1]: seq(A119910(n), n=0..100); # Wesley Ivan Hurt, Jun 19 2016
-
Mathematica
PadRight[{}, 100, {1, 3, 2, -1, -3, -2}] (* Wesley Ivan Hurt, Jun 19 2016 *)
Formula
From R. J. Mathar, Feb 08 2008: (Start)
O.g.f.: 2 + (3*x-2)/(x^2-x+1).
a(n) = -a(n-3) for n>3. (End)
a(n) = a(n-1) - a(n-2) for n>2. - Philippe Deléham, Nov 16 2008
a(n) = (4*sqrt(3)*sin(n*Pi/3) - 6*cos(n*Pi/3))/3. - Wesley Ivan Hurt, Jun 19 2016
Extensions
New name from Omar E. Pol, Oct 31 2013
Comments