OFFSET
1,2
COMMENTS
1009 and 9973 are the smallest and largest four-digit primes, respectively.
The theorem of Dirichlet shows that this sequence is infinite. - Stefan Steinerberger, Feb 12 2006
EXAMPLE
If k=0, then 9973*k + 1009 = 1009 (prime).
If k=168, then 9973*k + 1009 = 1676473 (prime).
MATHEMATICA
For[n = 1, n < 1000, n++, If[PrimeQ[(9973*n + 1009)], Print[n]]] (* Stefan Steinerberger, Feb 12 2006 *)
Select[Range[0, 1000], PrimeQ[9973 # + 1009] &] (* Vincenzo Librandi, Sep 14 2015 *)
PROG
(Magma) [n: n in [0..800] | IsPrime(9973*n + 1009)]; // Vincenzo Librandi, Sep 14 2015
(PARI) is(n)=isprime(9973*n+1009) \\ Charles R Greathouse IV, Feb 17 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Parthasarathy Nambi, May 06 2005
EXTENSIONS
More terms from Stefan Steinerberger, Feb 12 2006
STATUS
approved