OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..100
FORMULA
a(n) > (1/2 + o(1)) n^n. - Charles R Greathouse IV, Oct 22 2013
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
Jean-François Alcover, Oct 22 2013
EXTENSIONS
a(11)-a(19) from Charles R Greathouse IV, Oct 22 2013
STATUS
approved