For example, (3, 11, 71, 331, 359) is a Barker sequence, or a Wieferich 5-tuple; (5, 188748146801, 453029, 53, 97, 76704103313, 4794006457, 12197, 3049, 41) is a Barker sequence, or a Wieferich 10-tuple.
For the smallest Wieferich n-tuple, see OEIS: A271100, for the ordered set of all Wieferich tuples, see OEIS: A317721.
Wieferich sequenceedit
Wieferich sequence is a special type of Barker sequence. Every integer k>1 has its own Wieferich sequence. To make a Wieferich sequence of an integer k>1, start with a(1)=k, a(n) = the smallest prime p such that a(n-1)p-1 = 1 (mod p) but a(n-1) ≠ 1 or -1 (mod p). It is a conjecture that every integer k>1 has a periodic Wieferich sequence. For example, the Wieferich sequence of 2:
2, 1093, 5, 20771, 18043, 5, 20771, 18043, 5, ..., it gets a cycle: {5, 20771, 18043}. (a Wieferich triple)
The Wieferich sequence of 83:
83, 4871, 83, 4871, 83, 4871, 83, ..., it gets a cycle: {83, 4871}. (a Wieferich pair)
The Wieferich sequence of 59: (this sequence needs more terms to be periodic)
59, 2777, 133287067, 13, 863, 7, 5, 20771, 18043, 5, ... it also gets 5.
However, there are many values of a(1) with unknown status. For example, the Wieferich sequence of 3:
3, 11, 71, 47, ? (There are no known Wieferich primes in base 47).
The Wieferich sequence of 14:
14, 29, ? (There are no known Wieferich primes in base 29 except 2, but 22 = 4 divides 29 - 1 = 28)
It is unknown that values for k exist such that the Wieferich sequence of k does not become periodic. Eventually, it is unknown that values for k exist such that the Wieferich sequence of k is finite.
When a(n - 1)=k, a(n) will be (start with k = 2): 1093, 11, 1093, 20771, 66161, 5, 1093, 11, 487, 71, 2693, 863, 29, 29131, 1093, 46021, 5, 7, 281, ?, 13, 13, 25633, 20771, 71, 11, 19, ?, 7, 7, 5, 233, 46145917691, 1613, 66161, 77867, 17, 8039, 11, 29, 23, 5, 229, 1283, 829, ?, 257, 491531, ?, ... (For k = 21, 29, 47, 50, even the next value is unknown)