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.
%I A201912 #21 Feb 02 2019 03:16:52 %S A201912 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 A201912 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 A201912 4,8,16,9,18,13,3,6,12,1,2,4,8,16,3,6,12,24 %N A201912 Irregular triangle of 2^k mod prime(n). %C A201912 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 A201912 T. D. Noe, <a href="/A201912/b201912.txt">Rows n = 1..60, flattened</a> %e A201912 The first 11 rows are: %e A201912 2: 0; %e A201912 3: 1, 2; %e A201912 5: 1, 2, 4, 3; %e A201912 7: 1, 2, 4; %e A201912 11: 1, 2, 4, 8, 5, 10, 9, 7, 3, 6; %e A201912 13: 1, 2, 4, 8, 3, 6, 12, 11, 9, 5, 10, 7; %e A201912 17: 1, 2, 4, 8, 16, 15, 13, 9; %e A201912 19: 1, 2, 4, 8, 16, 13, 7, 14, 9, 18, 17, 15, 11, 3, 6, 12, 5, 10; %e A201912 23: 1, 2, 4, 8, 16, 9, 18, 13, 3, 6, 12; %e A201912 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 A201912 31: 1, 2, 4, 8, 16; %t A201912 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 A201912 (GAP) P:=Filtered([1..350],IsPrime);; %o A201912 R:=List([1..Length(P)],n->OrderMod(2,P[n]));; %o A201912 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 A201912 Cf. A062117, A201908, A201909, A201910, A201911. %Y A201912 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 A201912 nonn,tabf %O A201912 1,3 %A A201912 _T. D. Noe_, Dec 17 2011