# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a266909 Showing 1-1 of 1 %I A266909 #18 Jan 07 2016 02:57:06 %S A266909 1,2,0,1,0,2,0,0,3,1,0,4,0,0,1,0,1,2,0,0,0,2,0,1,0,0,1,1,0,0,1,2,0,0, %T A266909 3,0,1,0,1,2,3,1,0,0,0,4,0,0,1,0,1,0,3,4,1,0,7,2,0,0,1,0,0,2,0,1,0,1, %U A266909 0,0,1,1,0,0,0,2,0,0,1,6,0,0,5,0,1,0,3,2,3,0,1,0,1,4,3,1,0,0,0,0,0,10,0 %N A266909 Table read by rows: for each k < n and coprime to n, the least x>=0 such that x*n+k is prime. %C A266909 By Dirichlet's theorem, such x exists whenever k is coprime to n. %C A266909 By Linnik's theorem, there exist constants b and c such that T(n,k) <= b n^c for all n and all k < n coprime to n. %C A266909 T(n,1) = A034693(n). %C A266909 T(n,n-1) = A053989(n)-1. %C A266909 T(prime(n),1) = A035096(n). %C A266909 T(2^n,1) = A035050(n). %C A266909 A085427(n) = T(2^n,2^n-1) + 1. %C A266909 A126717(n) = 2*T(2^(n+1),2^n-1) + 1. %C A266909 A257378(n) = 2*T(n*2^(n+1),n*2^n+1) + 1. %C A266909 A257379(n) = 2*T(n*2^(n+1),n*2^n-1) + 1. %H A266909 Robert Israel, Table of n, a(n) for n = 1..10975 (rows 2 to 190, flattened) %H A266909 Wikipedia, Dirichlet's theorem on arithmetic progressions. %H A266909 Wikipedia, Linnik's theorem %H A266909 Index entries for sequences related to primes in arithmetic progressions %e A266909 The first few rows are %e A266909 n=2: 1 %e A266909 n=3: 2, 0 %e A266909 n=4: 1, 0 %e A266909 n=5: 2, 0, 0, 3 %e A266909 n=6: 1, 0 %p A266909 T:= proc(n,k) local x; %p A266909 if igcd(n,k) <> 1 then return NULL fi; %p A266909 for x from 0 do if isprime(x*n+k) then return x fi %p A266909 od %p A266909 end proc: %p A266909 seq(seq(T(n,k),k=1..n-1),n=2..30); %t A266909 Table[Map[Catch@ Do[x = 0; While[! PrimeQ[x n + #], x++]; Throw@ x, {10^3}] &, Range@ n /. k_ /; GCD[k, n] > 1 -> Nothing], {n, 2, 19}] // Flatten (* _Michael De Vlieger_, Jan 06 2016 *) %Y A266909 Cf. A034693, A035050, A035096, A053989, A085427, A126717, A257378, A257379. %K A266909 nonn,tabf %O A266909 1,2 %A A266909 _Robert Israel_, Jan 05 2016 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE