%I #14 Feb 02 2019 06:42:37
%S 1,1,1,2,4,3,0,1,7,5,2,3,10,4,6,9,8,1,7,10,5,9,11,12,6,3,8,4,2,1,7,15,
%T 3,4,11,9,12,16,10,2,14,13,6,8,5,1,7,11,1,7,3,21,9,17,4,5,12,15,13,22,
%U 16,20,2,14,6,19,18,11,8,10,1,7,20,24,23,16,25
%N Irregular triangle of 7^k mod prime(n).
%C Except for the fourth row, the first term of each row is 1. Many sequences are in this one: starting at A036132 (mod 71) and A070404 (mod 11).
%H T. D. Noe, <a href="/A201911/b201911.txt">Rows n = 1..60, flattened</a>
%e The first 9 rows are:
%e 1
%e 1
%e 1, 2, 4, 3
%e 0
%e 1, 7, 5, 2, 3, 10, 4, 6, 9, 8
%e 1, 7, 10, 5, 9, 11, 12, 6, 3, 8, 4, 2
%e 1, 7, 15, 3, 4, 11, 9, 12, 16, 10, 2, 14, 13, 6, 8, 5
%e 1, 7, 11
%e 1, 7, 3, 21, 9, 17, 4, 5, 12, 15, 13, 22, 16, 20, 2, 14, 6, 19, 18, 11, 8, 10
%t nn = 10; p = 7; t = p^Range[0,Prime[nn]]; Flatten[Table[If[Mod[n, p] == 0, {0}, tm = Mod[t, n]; len = Position[tm, 1, 1, 2][[-1,1]]; Take[tm, len-1]], {n, Prime[Range[nn]]}]]
%o (GAP) P:=Filtered([1..350],IsPrime);;
%o R:=List([1..Length(P)],n->OrderMod(7,P[n]));;
%o Flat(Concatenation([1,1,1,2,4,3,0],List([5..10],n->List([0..R[n]-1],k->PowerMod(7,k,P[n]))))); # _Muniru A Asiru_, Feb 01 2019
%Y Cf. A201908 (2^k), A201909 (3^k), A201910 (5^k).
%Y Cf. A070404 (11), A070405 (13), A070407 (17), A070409 (23), A070413 (29), A070415 (31), A070420 (37), A070422 (39), A070424 (41), A070425 (43), A070429 (47), A036132 (71).
%K nonn,tabf
%O 1,4
%A _T. D. Noe_, Dec 07 2011