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.

This page as a plain text file.
%I A020498 #32 Nov 26 2024 05:23:08
%S A020498 1,3,7,9,13,19,21,27,31,33,37,43,49,51,57,63,69,73,79,87,91,97,99,103,
%T A020498 111,117,121,129,133,139,141,147,153,157,159,163,169,177,183,187,189,
%U A020498 199,201,211,213,217,231,241,243,247,253,261,267,271,273,279,283,289
%N 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.
%C A020498 Conjecturally, a(n) is the smallest number such that n primes occur infinitely often among (x+a(1), ...,x+a(n)).
%C A020498 From _M. F. Hasler_, Nov 25 2024: (Start)
%C A020498 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).
%C A020498 (Instead of a(1...n), one can consider any collection of terms.) - Examples:
%C A020498 (1) p = 2, r = 0, n = 1: No term can be congruent to 0 (mod 2), i.e., even.
%C A020498 (2) p = 3, r = 2, n = 2: No term may be congruent to 2 (mod 3).
%C A020498 (3) p = 5, r = 0, n = 4: No term may be a multiple of 5.
%C A020498 (4) p = 7, r = 4, n = 6: No term may be congruent to 4 (mod 7).
%C A020498 (5) p = 11, r = 6, n = 11: No term may be congruent to 6 (mod 11). (End)
%D A020498 R. K. Guy's "Unsolved Problems in Number Theory" (2nd edition, Springer, 1994), Section A9.
%H A020498 David W. Wilson, <a href="/A020498/b020498.txt">Table of n, a(n) for n = 1..10000</a>
%H A020498 Sean A. Irvine, <a href="https://github.com/archmageirvine/joeis/blob/master/src/irvine/oeis/a020/A020498.java">Java program</a> (github)
%e A020498 From _M. F. Hasler_, Nov 25 2024: (Start)
%e A020498 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.
%e A020498 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.)
%e A020498   So 5 is excluded and the smallest choice is a(3) = 7. (End)
%o A020498 (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
%Y A020498 Cf. A020497, A008407.
%K A020498 nonn
%O A020498 1,2
%A A020498 _Robert G. Wilson v_ and _Christopher E. Thompson_
%E A020498 More terms from _David Wasserman_, Aug 17 2005
%E A020498 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
%E A020498 Definition reworded by _M. F. Hasler_, Nov 25 2024