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.

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

Original entry on oeis.org

1, 1, 1, 2, 4, 3, 0, 1, 7, 5, 2, 3, 10, 4, 6, 9, 8, 1, 7, 10, 5, 9, 11, 12, 6, 3, 8, 4, 2, 1, 7, 15, 3, 4, 11, 9, 12, 16, 10, 2, 14, 13, 6, 8, 5, 1, 7, 11, 1, 7, 3, 21, 9, 17, 4, 5, 12, 15, 13, 22, 16, 20, 2, 14, 6, 19, 18, 11, 8, 10, 1, 7, 20, 24, 23, 16, 25
Offset: 1

Views

Author

T. D. Noe, Dec 07 2011

Keywords

Comments

Except for the fourth row, the first term of each row is 1. Many sequences are in this one: starting at A036132 (mod 71) and A070404 (mod 11).

Examples

			The first 9 rows are:
  1
  1
  1, 2,  4,  3
  0
  1, 7,  5,  2, 3, 10,  4,  6,  9,  8
  1, 7, 10,  5, 9, 11, 12,  6,  3,  8,  4,  2
  1, 7, 15,  3, 4, 11,  9, 12, 16, 10,  2, 14, 13,  6, 8,  5
  1, 7, 11
  1, 7,  3, 21, 9, 17,  4,  5, 12, 15, 13, 22, 16, 20, 2, 14, 6, 19, 18, 11, 8, 10
		

Crossrefs

Cf. A201908 (2^k), A201909 (3^k), A201910 (5^k).
Cf. A070404 (11), A070405 (13), A070407 (17), A070409 (23), A070413 (29), A070415 (31), A070420 (37), A070422 (39), A070424 (41), A070425 (43), A070429 (47), A036132 (71).

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 = 7; 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]]}]]