login
Irregular triangle of 3^k mod prime(n).
7

%I #17 Feb 02 2019 03:16:29

%S 1,0,1,3,4,2,1,3,2,6,4,5,1,3,9,5,4,1,3,9,1,3,9,10,13,5,15,11,16,14,8,

%T 7,4,12,2,6,1,3,9,8,5,15,7,2,6,18,16,10,11,14,4,12,17,13,1,3,9,4,12,

%U 13,16,2,6,18,8,1,3,9,27,23,11,4,12,7,21,5,15

%N Irregular triangle of 3^k mod prime(n).

%C The row lengths are in A062117. Except for the second row, the first term of each row is 1. Many sequences are in this one: starting at A036119 (mod 17) and A070341 (mod 11).

%H T. D. Noe, <a href="/A201909/b201909.txt">Rows n = 1..60. flattened</a>

%e The first 9 rows are:

%e 1

%e 0

%e 1, 3, 4, 2

%e 1, 3, 2, 6, 4, 5

%e 1, 3, 9, 5, 4

%e 1, 3, 9

%e 1, 3, 9, 10, 13, 5, 15, 11, 16, 14, 8, 7, 4, 12, 2, 6

%e 1, 3, 9, 8, 5, 15, 7, 2, 6, 18, 16, 10, 11, 14, 4, 12, 17, 13

%e 1, 3, 9, 4, 12, 13, 16, 2, 6, 18, 8

%t nn = 10; p = 3; 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. A062117, A201908 (2^k), A201910 (5^k), A201911 (7^k).

%Y Cf. A070352 (5), A033940 (7), A070341 (11), A168399 (13), A036119 (17), A070342 (19), A070356 (23), A070344 (29), A036123 (31), A070346 (37), A070361 (41), A036126 (43), A070364 (47), A036134 (79), A036136 (89), A036142 (113), A036143 (127), A036145 (137), A036158 (199), A036160 (223).

%K nonn,tabf

%O 1,4

%A _T. D. Noe_, Dec 07 2011