%I #26 Sep 08 2022 08:46:06
%S 1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,
%T 2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,
%U 1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1
%N Period 4: repeat 1,1,2,1.
%D H. Blaine Lawson, Jr. and M.-L. Michelsohn, Spin Geometry, Princeton, p. 33.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,1).
%F a(n) = a(n-4) for n > 4. G.f.: x*(1 + x + 2*x^2 + x^3)/(1 - x^4). - _Chai Wah Wu_, Jun 04 2016
%F E.g.f.: (-2 - sin(x) + 3*sinh(x) + 2*cosh(x))/2. - _Ilya Gutkovskiy_, Jun 04 2016
%F a(n) = (5-cos(n*Pi)-2*sin(n*Pi/2))/4. - _Luce ETIENNE_, Feb 17 2017
%o (Magma) &cat [[1, 1, 2, 1]^^24]; // _Bruno Berselli_, Dec 10 2015
%o (PARI) a(n)=n=n%8; if(n==3||n==7, 2, 1) \\ _Charles R Greathouse IV_, Jul 17 2016
%Y Cf. A177704.
%K nonn,easy
%O 1,3
%A _N. J. A. Sloane_, Jan 29 2014
%E Definition corrected by _Paul Curtz_. - _N. J. A. Sloane_, Oct 10 2016