login
a(n) is the smallest prime of the form b*prime(n+1) + prime(n) with b > 0.
3

%I #18 May 05 2014 14:43:27

%S 5,13,19,29,37,47,131,157,139,277,179,283,127,137,577,643,181,463,919,

%T 509,389,577,439,283,1511,307,317,761,787,367,389,953,971,1033,3169,

%U 1093,809,1499,859,3037,541,563,577,587,1789,2309,1103,677,1601,1627

%N a(n) is the smallest prime of the form b*prime(n+1) + prime(n) with b > 0.

%C Dirichlet's theorem ensures that there always exists such a smallest prime because two primes are always coprime.

%C Corresponding values of b: 1,2,2,2,2,2,6,6,4, ... - _Zak Seidov_, Aug 29 2012

%H Harvey P. Dale, <a href="/A129919/b129919.txt">Table of n, a(n) for n = 1..1000</a>

%e a(2) is the smallest prime of the form 5*b+3 and b > 0. Hence a(2) = 13.

%t a[n_] := Module[{k}, k = 1; While[Not[PrimeQ[k*Prime[n + 1] + Prime[n]]], k++ ]; k*Prime[n + 1] + Prime[n]]; Table[a[i], {i, 1, 50}]

%t sp[{a_,b_}]:=Module[{n=1},While[!PrimeQ[n*b+a],n++];n*b+a]; sp/@Partition[ Prime[Range[60]],2,1] (* _Harvey P. Dale_, Jan 02 2013 *)

%Y Cf. A035095.

%K nonn

%O 1,1

%A _J. M. Bergot_, Jun 05 2007

%E Edited and extended by _Stefan Steinerberger_, Jul 16 2007