|
|
A230518
|
|
Smallest prime p = a(n) such that the sum of p and the next prime has n distinct prime factors.
|
|
2
|
|
|
2, 5, 13, 103, 1783, 15013, 285283, 9699667, 140645501, 4127218087, 100280245063, 5625398263453, 202666375276361, 11602324073775431, 438272504610946003, 21828587281891445047, 1156915125940246587913, 66595945348137856405747, 4632891063696575353839163
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
30 = 13+17 is the earliest case with 3 prime divisors, so a(3) = 13.
|
|
MATHEMATICA
|
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}]
|
|
PROG
|
(PARI) a(n) = {p = 2; while (omega(p+nextprime(p+1)) != n, p = nextprime(p+1)); p; } \\ Michel Marcus, Oct 22 2013
(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);
bad(n)=precprime(n/2)+nextprime(n/2)!=n || isprime(n/2);
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|