login
Smallest prime p such that p+n is the product of exactly n distinct primes.
3

%I #27 Jun 13 2017 22:11:35

%S 2,13,67,1151,9277,1616609,1874723,111546427,2751478721,862410107549,

%T 747543645019,3080843115635273,1006366256282297,2679162624135569701,

%U 166366498382137547479,993969333554296364249,8302567374394710807373

%N Smallest prime p such that p+n is the product of exactly n distinct primes.

%C The sequence goes on with a(18, 19, 20, ...) = 112733682549950000276752997, 32674073817649531442865671, 376147205196163170923414109829, ... - _M. F. Hasler_, Jan 14 2012

%C The terms are of the form a(n)=A002110(n+k)/Q - n, where Q is the product of k among the first n+k-1 primes, and these k primes include all prime factors of n, cf. examples. - _M. F. Hasler_, Jan 14 2012

%C This sequence is infinite under Dickson's conjecture. - _Charles R Greathouse IV_, Jan 16 2012

%e a(4)=1151, for example, is the first of a sequence of primes that continues with 1361, 2141, 2411, 2801, 3251, 3881, 3923, ...with the property 1151+4=3*5*7*11, 1361+4=3*5*7*13, 2141+5=3*5*11*13, 2801+4=3*5*11*17, 3251+4=3*5*7*31, 3881+4=3*5*7*37, 3923+4=3*7*11*17, ...

%e The terms can be written a(n)=A002110(n+k)/Q-n (cf. comment) as follows:

%e a(1)=A002110(2)/2 - 1

%e a(2)=A002110(3)/2 - 2

%e a(3)=A002110(4)/3 - 3

%e a(4)=A002110(5)/2 - 4

%e a(5)=A002110(7)/(5*11) - 5

%e a(6)=A002110(8)/(2*3) - 6

%e a(7)=A002110(9)/(7*17) - 7

%e a(8)=A002110(9)/2 - 8

%e a(9)=A002110(12)/(3*29*31) - 9

%e a(10)=A002110(14)/(2*5*37*41) - 10

%e a(11)=A002110(13)/(11*37) - 11

%e a(12)=A002110(16)/(2*3*41*43) - 12

%e a(13)=A002110(14)/13 - 13

%e a(14)=A002110(18)/(2*7*53*59) - 14

%e a(15)=A002110(18)/(3*5*47) - 15

%e a(16)=A002110(18)/(2*59) - 16

%e a(17)=A002110(20)/(17*59*67) - 17

%e a(18)=A002110(22)/(2*3*67*71) - 18

%e etc.

%t Table[k := 1; While[Not[Length[FactorInteger[Prime[k] + n]] == n], k++ ]; Prime[k], {n, 1, 7}] (* _Stefan Steinerberger_, Apr 03 2006 *)

%o (PARI) A097977(n,show=0,LIM=9)={ my(P=A002110(n),M); for(i=0,LIM,i && P*=prime(n+i); forvec(v=vector(i,j,[1,n+i-1]),t=P/prod(j=1,#v,prime(n+i-v[j]))-n; M && t>=M && (v[#v]+=n+i) && next; isprime(t) || next; M=t; show && print([t,i,v]),2)); M} \\ _M. F. Hasler_, Jan 14 2012

%o (Haskell)

%o a097977 n = head [p | p <- dropWhile (<= n) a000040_list,

%o a001221 (p + n) == n]

%o -- _Reinhard Zumkeller_, Jun 24 2015

%Y Cf. A000040, A001221, A002110, A191587.

%K hard,nonn

%O 1,1

%A _Lekraj Beedassy_, Sep 07 2004

%E 2 more terms from _Stefan Steinerberger_, Apr 03 2006

%E a(8)-a(15) from _Donovan Johnson_, Oct 05 2010

%E a(16) from _Donovan Johnson_, Jan 14 2012

%E a(17)-a(20) from _M. F. Hasler_, Jan 14 2012