Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #23 Apr 18 2024 09:28:46
%S 2,2,2,1,0,0,0,1,2,2,2,1,0,0,0,1,2,2,2,1,0,0,0,1,2,2,2,1,0,0,0,1,2,2,
%T 2,1,0,0,0,1,2,2,2,1,0,0,0,1,2,2,2,1,0,0,0,1,2,2,2,1,0,0,0,1,2,2,2,1,
%U 0,0,0,1,2,2,2,1,0,0,0,1,2,2,2,1,0,0,0,1,2,2,2,1,0,0,0,1,2,2,2,1,0,0,0,1,2
%N Periodic sequence (2, 2, 2, 1, 0, 0, 0, 1).
%C Second column of triangular array T defined in A131074.
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,-1,1).
%F a(n) = a(n-8).
%F G.f.: x*(2-x^3+x^4)/((1-x)*(1+x^4)).
%t PadRight[{},120,{2,2,2,1,0,0,0,1}] (* _Harvey P. Dale_, Mar 04 2020 *)
%o (PARI) {m=105; for(n=1, m, r=(n-1)%8; print1(if(r<3, 2, if(r==3||r==7, 1, 0)), ","))}
%o (Magma) m:=105; [ [2, 2, 2, 1, 0, 0, 0, 1][(n-1) mod 8 + 1]: n in [1..m] ];
%Y Cf. A131074, A131026.
%K nonn,easy,less
%O 1,1
%A _Klaus Brockhaus_, following a suggestion of _Paul Curtz_, Jun 14 2007