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

 


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A230518 Smallest prime p = a(n) such that the sum of p and the next prime has n distinct prime factors. 2

%I #16 Oct 22 2013 18:48:00

%S 2,5,13,103,1783,15013,285283,9699667,140645501,4127218087,

%T 100280245063,5625398263453,202666375276361,11602324073775431,

%U 438272504610946003,21828587281891445047,1156915125940246587913,66595945348137856405747,4632891063696575353839163

%N Smallest prime p = a(n) such that the sum of p and the next prime has n distinct prime factors.

%H Charles R Greathouse IV, <a href="/A230518/b230518.txt">Table of n, a(n) for n = 1..100</a>

%F a(n) > (1/2 + o(1)) n^n. - _Charles R Greathouse IV_, Oct 22 2013

%e 30 = 13+17 is the earliest case with 3 prime divisors, so a(3) = 13.

%t Clear[a]; a[_] = 0; Do[p = Prime[k]; q = Prime[k+1]; n = PrimeNu[p+q]; If[a[n] == 0, a[n] = p; Print["a(", n, ") = p = ", p, ", q = ", q]], {k, 1, 10^9}]; Table[a[n], {n, 1, 10}]

%o (PARI) a(n) = {p = 2; while (omega(p+nextprime(p+1)) != n, p = nextprime(p+1)); p;} \\ _Michel Marcus_, Oct 22 2013

%o (PARI) step(Fvec)=my([n,f]=Fvec,v=List(),t);for(i=1,#f~,t=f;t[i,2]++;listput(v,[n*f[i,1],t]);t=f;t[i,1]=nextprime(t[i,1]+1);if(i==#f~||t[i,1]<t[i+1,1],listput(v,[n*t[i,1]/f[i,1],t])));Vec(v);

%o bad(n)=precprime(n/2)+nextprime(n/2)!=n || isprime(n/2);

%o a(n)=if(n==1,return(2)); my(f=matrix(n,2,i,j,if(j>1,1,prime(i))),v=[[factorback(f),f]],t); if(!bad(v[1][1]),return(precprime(v[1][1]/2))); v=vecsort(step(v[1]),1); while(bad(v[1][1]), v=vecsort(concat(step(v[1]),v[2..#v]),1,8)); precprime(v[1][1]/2); \\ _Charles R Greathouse IV_, Oct 22 2013

%Y Cf. A001043, A071215, A071216, A098037, A105418.

%K nonn

%O 1,1

%A _Jean-François Alcover_, Oct 22 2013

%E a(11)-a(19) from _Charles R Greathouse IV_, Oct 22 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 19 09:19 EDT 2024. Contains 376007 sequences. (Running on oeis4.)