A034693 Smallest k such that k*n+1 is prime.
1, 1, 2, 1, 2, 1, 4, 2, 2, 1, 2, 1, 4, 2, 2, 1, 6, 1, 10, 2, 2, 1, 2, 3, 4, 2, 4, 1, 2, 1, 10, 3, 2, 3, 2, 1, 4, 5, 2, 1, 2, 1, 4, 2, 4, 1, 6, 2, 4, 2, 2, 1, 2, 2, 6, 2, 4, 1, 12, 1, 6, 5, 2, 3, 2, 1, 4, 2, 2, 1, 8, 1, 4, 2, 2, 3, 6, 1, 4, 3, 2, 1, 2, 4, 12, 2, 4, 1, 2, 2, 6, 3, 4, 3, 2, 1, 4, 2
Offset: 1
Examples
If n=7, the smallest prime in the sequence 8, 15, 22, 29, ... is 29, so a(7)=4.
References
- Steven R. Finch, Mathematical Constants, Cambridge, 2003, section 2.12, pp. 127-130.
- P. Ribenboim, (1989), The Book of Prime Number Records. Chapter 4, Section IV.B.: The Smallest Prime In Arithmetic Progressions, pp. 217-223.
Links
- T. D. Noe, Table of n, a(n) for n = 1..10000
- Gunther Cornelissen, David Hokken, and Berend Ringeling, The asymptotic Mahler measure of Gaussian periods, arXiv:2507.09303 [math.NT], 2025. See p. 1.
- Steven R. Finch, Linnik's Constant
- D. Graham, On Linnik's Constant, Acta Arithm., 39, 1981, pp. 163-179.
- D. R. Heath-Brown, Zero-free regions for Dirichlet L-functions, and the least prime in an arithmetic progression, Proc. London Math. Soc. 64(3) (1992), pp. 265-338.
- Pengcheng Niu and Junli Zhang, On Two Conjectures of A. Murthy, ResearchGate (2024).
- Ivan Niven and Barry Powell, Primes in Certain Arithmetic Progressions, Amer. Math. Monthly, 83, 1976, pp. 467-489.
- Wikipedia, Dirichlet's theorem on arithmetic progressions
Crossrefs
Programs
-
Haskell
a034693 n = head [k | k <- [1..], a010051 (k * n + 1) == 1] -- Reinhard Zumkeller, Feb 14 2013
-
Maple
A034693 := proc(n) for k from 1 do if isprime(k*n+1) then return k; end if; end do: end proc: # R. J. Mathar, Jul 26 2015
-
Mathematica
a[n_]:=(k=0; While[!PrimeQ[++k*n + 1]]; k); Table[a[n], {n,100}] (* Jean-François Alcover, Jul 19 2011 *)
-
PARI
a(n)=if(n<0,0,s=1; while(isprime(s*n+1)==0,s++); s)
-
Python
from sympy import isprime def a(n): k = 1 while not isprime(k*n+1): k += 1 return k print([a(n) for n in range(1, 99)]) # Michael S. Branicky, May 05 2022
Formula
It seems that Sum_{k=1..n} a(k) is asymptotic to (zeta(2)-1)*n*log(n) where zeta(2)-1 = Pi^2/6-1 = 0.6449... . - Benoit Cloitre, Aug 11 2002
a(n) = (A034694(n)-1) / n. - Joerg Arndt, Oct 18 2020
Comments