cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A323874 Irregular triangle of 13^k mod prime(n).

This page as a plain text file.
%I A323874 #19 Feb 27 2019 14:21:02
%S A323874 1,1,1,3,4,2,1,6,1,2,4,8,5,10,9,7,3,6,0,1,13,16,4,1,13,17,12,4,14,11,
%T A323874 10,16,18,6,2,7,15,5,8,9,3,1,13,8,12,18,4,6,9,2,3,16,1,13,24,22,25,6,
%U A323874 20,28,16,5,7,4,23,9,1,13,14,27,10,6,16,22,7,29,5
%N A323874 Irregular triangle of 13^k mod prime(n).
%C A323874 Length of the n-th row (n != 6) is the order of 13 modulo the n-th prime.
%C A323874 Except for the sixth row, the first term of each row is 1.
%e A323874 The first 10 rows are:
%e A323874   1
%e A323874   1
%e A323874   1, 3, 4, 2
%e A323874   1, 6
%e A323874   1, 2, 4, 8, 5, 10, 9, 7, 3, 6
%e A323874   0
%e A323874   1, 13, 16, 4
%e A323874   1, 13, 17, 12, 4, 14, 11, 10, 16, 18, 6, 2, 7, 15, 5, 8, 9, 3
%e A323874   1, 13, 8, 12, 18, 4, 6, 9, 2, 3, 16
%e A323874   1, 13, 24, 22, 25, 6, 20, 28, 16, 5, 7, 4, 23, 9
%p A323874 T:= n-> (p-> `if`(p=13, 0, seq(13&^k mod p,
%p A323874          k=0..numtheory[order](13, p)-1)))(ithprime(n)):
%p A323874 seq(T(n), n=1..15);  # _Alois P. Heinz_, Feb 06 2019
%t A323874 With[{q = 13}, Table[If[p == q, {0}, Array[PowerMod[q, #, p] &, MultiplicativeOrder[q, p], 0]], {p, Prime@ Range@ 11}]] // Flatten (* _Michael De Vlieger_, Feb 25 2019 *)
%o A323874 (GAP) A000040:=Filtered([1..350],IsPrime);; p:=6;;
%o A323874 R:=List([1..Length(A000040)],n->OrderMod(A000040[p],A000040[n]));;
%o A323874 a1:=List([1..p-1],n->List([0..R[n]-1],k->PowerMod(A000040[p],k,A000040[n])));;
%o A323874 a:=Flat(Concatenation(a1,[0],List([p+1..2*p],n->List([0..R[n]-1],k->PowerMod(A000040[p],k,A000040[n])))));; Print(a);
%Y A323874 Cf. A000040.
%Y A323874 Cf. A201908 (2^k), A201909 (3^k), A201910 (5^k), A201911 (7^k), A323873 (11^k), this sequence (13^k).
%K A323874 nonn,tabf
%O A323874 1,4
%A A323874 _Muniru A Asiru_, Feb 04 2019