OFFSET
1,3
COMMENTS
LINKS
T. D. Noe, Rows n = 1..60, flattened
EXAMPLE
The first 11 rows are:
2: 0;
3: 1, 2;
5: 1, 2, 4, 3;
7: 1, 2, 4;
11: 1, 2, 4, 8, 5, 10, 9, 7, 3, 6;
13: 1, 2, 4, 8, 3, 6, 12, 11, 9, 5, 10, 7;
17: 1, 2, 4, 8, 16, 15, 13, 9;
19: 1, 2, 4, 8, 16, 13, 7, 14, 9, 18, 17, 15, 11, 3, 6, 12, 5, 10;
23: 1, 2, 4, 8, 16, 9, 18, 13, 3, 6, 12;
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;
31: 1, 2, 4, 8, 16;
MATHEMATICA
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]]}]]
PROG
(GAP) P:=Filtered([1..350], IsPrime);;
R:=List([1..Length(P)], n->OrderMod(2, P[n]));;
Flat(Concatenation([0], List([2..10], n->List([0..R[n]-1], k->PowerMod(2, k, P[n]))))); # Muniru A Asiru, Feb 01 2019
CROSSREFS
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).
KEYWORD
nonn,tabf
AUTHOR
T. D. Noe, Dec 17 2011
STATUS
approved