OFFSET
1,4
COMMENTS
LINKS
T. D. Noe, Rows n = 1..60, flattened
EXAMPLE
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
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]]}]]
PROG
(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
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
T. D. Noe, Dec 07 2011
STATUS
approved