Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #21 Feb 02 2019 03:16:52
%S 0,1,2,1,2,4,3,1,2,4,1,2,4,8,5,10,9,7,3,6,1,2,4,8,3,6,12,11,9,5,10,7,
%T 1,2,4,8,16,15,13,9,1,2,4,8,16,13,7,14,9,18,17,15,11,3,6,12,5,10,1,2,
%U 4,8,16,9,18,13,3,6,12,1,2,4,8,16,3,6,12,24
%N Irregular triangle of 2^k mod prime(n).
%C The row lengths are in A014664. For n > 1, the first term of each row is 1 and the last term is 2*prime(n)-1, which is A006254. Many sequences are in this one.
%H T. D. Noe, <a href="/A201912/b201912.txt">Rows n = 1..60, flattened</a>
%e The first 11 rows are:
%e 2: 0;
%e 3: 1, 2;
%e 5: 1, 2, 4, 3;
%e 7: 1, 2, 4;
%e 11: 1, 2, 4, 8, 5, 10, 9, 7, 3, 6;
%e 13: 1, 2, 4, 8, 3, 6, 12, 11, 9, 5, 10, 7;
%e 17: 1, 2, 4, 8, 16, 15, 13, 9;
%e 19: 1, 2, 4, 8, 16, 13, 7, 14, 9, 18, 17, 15, 11, 3, 6, 12, 5, 10;
%e 23: 1, 2, 4, 8, 16, 9, 18, 13, 3, 6, 12;
%e 29: 1, 2, 4, 8, 16, 3, 6, 12, 24, 19, 9, 18, 7, 14, 28, 27, 25, 21, 13, 26, 23, 17, 5, 10, 20, 11, 22, 15;
%e 31: 1, 2, 4, 8, 16;
%t nn = 10; p = 2; 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(2,P[n]));;
%o Flat(Concatenation([0],List([2..10],n->List([0..R[n]-1],k->PowerMod(2,k,P[n]))))); # _Muniru A Asiru_, Feb 01 2019
%Y Cf. A062117, A201908, A201909, A201910, A201911.
%Y Cf. similar sequences of the type 2^n mod p, where p is a prime: A000034 (p=3), A070402 (p=5), A069705 (p=7), A036117 (p=11), A036118 (p=13), A062116 (p=17), A036120 (p=19), A070335 (p=23), A036122 (p=29), A269266 (p=31), A036124 (p=37), A070348 (p=41), A070349 (p=43), A070351 (p=47), A036128 (p=53), A036129 (p=59), A036130 (p=61), A036131 (p=67), A036135 (p=83), A036138 (p=101), A036140 (p=107), A036144 (p=131), A036146 (p=139), A036147 (p=149), A036150 (p=163), A036152 (p=173), A036153 (p=179), A036154 (p=181), A036157 (p=197), A036159 (p=211), A036161 (p=227).
%K nonn,tabf
%O 1,3
%A _T. D. Noe_, Dec 17 2011