login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A194943 Greatest d such that d*n+b is the least prime in the arithmetic progression k*n+b for some 0 < b < n with gcd(b, n) = 1. 3

%I #37 May 20 2023 13:39:31

%S 1,2,1,3,1,4,2,4,1,6,1,7,3,2,2,6,2,10,2,4,3,10,3,10,3,6,2,10,2,18,4,6,

%T 5,6,4,11,5,5,3,14,2,10,5,8,6,20,3,12,5,8,11,12,3,6,4,7,5,12,2,24,9,6,

%U 5,6,3,15,5,8,3,18,4,24,8,8,6,10

%N Greatest d such that d*n+b is the least prime in the arithmetic progression k*n+b for some 0 < b < n with gcd(b, n) = 1.

%C a(n) exists due to Linnik's theorem; thus a(n) < c * n^4.2 for some constant c.

%C Heath-Brown's conjecture on Linnik's theorem implies that a(n) < n.

%C On the GRH, a(n) << phi(n) * log(n)^2 * phi(n)/n.

%C Pomerance shows that a(n) > (e^gamma + o(1)) log(n) * phi(n)/n, and Granville & Pomerance conjecture that a(n) >> log(n)^2 * phi(n)/n.

%H Charles R Greathouse IV, <a href="/A194943/b194943.txt">Table of n, a(n) for n = 2..10000</a>

%H A. Granville and C. Pomerance, <a href="http://www.math.dartmouth.edu/~carlp/least.pdf">On the least prime in certain arithmetic progressions</a>, Journal of the London Mathematical Society 2:41 (1990), pp. 193-200.

%H D. R. Heath-Brown, <a href="https://web.archive.org/web/20160317102203/http://eprints.maths.ox.ac.uk/166/1/linnik.pdf">Zero-free regions for Dirichlet L-functions, and the least prime in an arithmetic progression</a>, Proceedings of the London Mathematical Society 3:64 (1992), pp. 265-338.

%H C. Pomerance, <a href="http://www.math.dartmouth.edu/~carlp/PDF/paper24.pdf">A note on the least prime in an arithmetic progression</a>, Journal of Number Theory 12 (1980), pp. 218-223.

%F a(n) = floor(A085420(n)/n).

%t p[b_, d_] := Module[{k = b+d}, While[ !PrimeQ[k], k += d]; (k-b)/d]; a[n_] := Module[{r = p[1, n]}, For[b = 2, b <= n-1, b++, If[GCD[b, n] > 1, Null, r = Max[r, p[b, n]]]]; r]; Table[a[n], {n, 2, 100}] (* _Jean-François Alcover_, Oct 02 2013, translated from Pari *)

%o (PARI) p(b,d)=my(k=d+b);while(!isprime(k),k+=d);(k-b)/d

%o a(n)=my(r=p(1,n));for(b=2,n-1,if(gcd(b,n)>1,next);r=max(r,p(b,n)));r

%o (Python)

%o from math import gcd

%o from gmpy2 import is_prime

%o def p(b, d):

%o k = d + b

%o while not is_prime(k):

%o k += d

%o return (k-b)//d

%o def A194943(n):

%o return max(p(b, n) for b in range(1, n) if gcd(b, n) == 1)

%o print([A194943(n) for n in range(2, 82)]) # _Michael S. Branicky_, May 18 2023 after _Charles R Greathouse IV_

%Y Cf. A085420. Records are in A362850, A362851.

%K nonn,nice

%O 2,2

%A _Charles R Greathouse IV_, Sep 05 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 10:40 EDT 2024. Contains 371779 sequences. (Running on oeis4.)