A020498 a(n) is the least number > a(n-1) such that there is no prime p for which a(1) through a(n) would contain all residues modulo p.
1, 3, 7, 9, 13, 19, 21, 27, 31, 33, 37, 43, 49, 51, 57, 63, 69, 73, 79, 87, 91, 97, 99, 103, 111, 117, 121, 129, 133, 139, 141, 147, 153, 157, 159, 163, 169, 177, 183, 187, 189, 199, 201, 211, 213, 217, 231, 241, 243, 247, 253, 261, 267, 271, 273, 279, 283, 289
Offset: 1
Keywords
Examples
From _M. F. Hasler_, Nov 25 2024: (Start) a(2) can't be 2 because otherwise for the prime p = 2, we would have {a(1), a(2)} == {0, 1} (mod p), a complete set of residues. (For the same reason, no other term can be even.) So a(2) = 3 is the smallest possible choice. Similarly, a(3) must be odd but not congruent to 2 (mod 3) (*), otherwise {a(1), a(2), a(3)} would form a complete set of residues (mod 3). (* As before, this holds for all terms of the sequence.) So 5 is excluded and the smallest choice is a(3) = 7. (End)
References
- R. K. Guy's "Unsolved Problems in Number Theory" (2nd edition, Springer, 1994), Section A9.
Links
- David W. Wilson, Table of n, a(n) for n = 1..10000
- Sean A. Irvine, Java program (github)
Programs
-
PARI
upto(N, a=[1])={for(n=2, N, forstep(k=a[n-1]+2, oo, 2, forprime(p=3, n, #Set(concat(a,k)%p)==p && next(2)); a=concat(a,k); break));a} \\ M. F. Hasler, Nov 25 2024
Extensions
More terms from David Wasserman, Aug 17 2005
Old name has been interchanged with Wasserman's comment, as old name only a conjectural definition of the sequence. Edited by Christopher J. Smyth, May 12 2016
Definition reworded by M. F. Hasler, Nov 25 2024
Comments