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.

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.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Conjecturally, a(n) is the smallest number such that n primes occur infinitely often among (x+a(1), ...,x+a(n)).
From M. F. Hasler, Nov 25 2024: (Start)
For a given prime p, if r is the only residue (mod p) not among {a(1), ..., a(n)} (mod p) for some index n, then no term of the sequence can be congruent to r (mod p).
(Instead of a(1...n), one can consider any collection of terms.) - Examples:
(1) p = 2, r = 0, n = 1: No term can be congruent to 0 (mod 2), i.e., even.
(2) p = 3, r = 2, n = 2: No term may be congruent to 2 (mod 3).
(3) p = 5, r = 0, n = 4: No term may be a multiple of 5.
(4) p = 7, r = 4, n = 6: No term may be congruent to 4 (mod 7).
(5) p = 11, r = 6, n = 11: No term may be congruent to 6 (mod 11). (End)

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.

Crossrefs

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