%I #13 Dec 26 2022 08:38:00
%S 0,1,4,2,10,10,10,10,52,94,230,606,982,2194,4388,8776,17552,86840,
%T 277152,744616,2597840,7412896,20021472,17423632,40042944,74890208,
%U 459732608,149780416,1069245632,1069245632,1069245632,1069245632
%N This sequence needs a meaningful name.
%H Andrzej Kozlowski, <a href="http://forums.wolfram.com/mathgroup/archive/2006/Aug/msg00440.html">Re: too many special linear matrices</a>, Mathematica forum, 17 August 2006.
%t SL[n_, p_] := Module[{vars = Table[Unique[ a], {n^2}], iters, mat}, iters = Map[{#, 0, p - 1} &, vars]; mat = Partition[vars, n]; Reap[ Do[If[Det[mat, Modulus -> p] == 1, Sow[mat], Continue[]], Evaluate[Sequence @@ iters]]][[2, 1]]]
%t a0 = SL[2, 3];
%t M[n_] := a0[[1 + Mod[n, Length[a0]]]]
%t v[1] = {0, 1}
%t v[n_] := v[n] = M[n].v[n - 1]
%t a = Table[Floor[v[n][[1]]], {n, 1, 50}]
%K nonn,uned
%O 1,3
%A _Roger L. Bagula_, Aug 24 2006