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.

A279073 Smallest positive number whose residues modulo the first n primes are all different.

This page as a plain text file.
%I A279073 #14 Jan 22 2017 17:46:58
%S A279073 1,2,3,5,8,87,116,129,129,129,129,129,129,202,202,202,202,202,6753,
%T A279073 7769,14614,14614,16574,30777,30777,30777,30777,30777,90878,99483,
%U A279073 99483,99483,99483,99483,99483,99483,99483,680384,845662,1719404,1787204,1787204,1787204
%N A279073 Smallest positive number whose residues modulo the first n primes are all different.
%C A279073 This sequence begins like the Fibonacci sequence. Are any terms beyond a(5) = 8 also Fibonacci numbers?
%C A279073 From _Jon E. Schoenfield_, Jan 15 2017: (Start)
%C A279073 a(n) = min_{k : A279086(k) >= n}.
%C A279073 For the smallest positive number having exactly n distinct residues modulo p before the first repeated residue occurs as p runs through the primes, see A279074. (E.g., a(n)=129 for n=8..13, but A279074(n)=129 only at n=13.) (End)
%e A279073 For n=6, the first n primes are {2, 3, 5, 7, 11, 13}; 87 mod {2, 3, 5, 7, 11, 13} = {1, 0, 2, 3, 10, 9} (all different), and this does not occur for any k < 87, so a(6) = 87.
%e A279073 For n=8, 129 mod (each of the first n primes) gives {1, 0, 4, 3, 8, 12, 10, 15} (all different), and this does not occur for any k < 129, so a(8) = 129. Additionally, 129 mod p for each of the next 5 primes p gives {14, 13, 5, 18, 6} (all different from the first eight residues and from each other), so 129 is also a(9)..a(13). (This run of identical terms stops at n=13, since 129 mod prime(14) = 129 mod 43 = 0 = 129 mod prime(2).)
%t A279073 f[k_, m_] := Mod[k, #] & /@ Prime[Range[m]]; lst = {1};
%t A279073 f[n_] := Module[{k = Last[lst]},While[Sort[f[k, n]] != Union[f[k, n]], k++]; AppendTo[lst, k]];f /@ Range[30]; Rest[lst] (* _Ivan N. Ianakiev_, Jan 17 2017 *)
%o A279073 (PARI) a(n) = {k = 1; ok = 0; while (!ok, vp = vector(n, j, k % prime(j)); if (#vecsort(vp,,8) == n, ok = 1, k++);); k;} \\ _Michel Marcus_, Jan 22 2017
%Y A279073 Cf. A000040, A000045, A279074, A279086.
%K A279073 nonn
%O A279073 1,2
%A A279073 _Jon E. Schoenfield_, Jan 12 2017