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.

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

Original entry on oeis.org

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, 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, 13, 16, 2, 6, 18, 8, 1, 3, 9, 27, 23, 11, 4, 12, 7, 21, 5, 15
Offset: 1

Views

Author

T. D. Noe, Dec 07 2011

Keywords

Comments

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).

Examples

			The first 9 rows are:
  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,  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, 13, 16,  2,  6, 18,  8
		

Crossrefs

Cf. A062117, A201908 (2^k), A201910 (5^k), A201911 (7^k).
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).

Programs

  • GAP
    P:=Filtered([1..350],IsPrime);;
    R:=List([1..Length(P)],n->OrderMod(7,P[n]));;
    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
  • Mathematica
    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]]}]]