OFFSET
2,1
LINKS
Peter J. C. Moses, Table of n, a(n) for n = 2..1001
FORMULA
If [prime(n), prime(n+1)] is a twin pair, then a(n) <= prime(n)*prime(n+1).
EXAMPLE
15 is the least number of considered form, and 5/3 = 1 + 2/prime(2). So a(2)=15; in case of n=23, not only 28223 but also 29237 satisfies required inequality and we choose the smallest from them.
MATHEMATICA
tmp={1}; Do[test=1+2/Prime[n]; AppendTo[tmp, NestWhile[#+2&, Last[tmp]+2, !((Max[#]/Min[#]&[Map[#[[1]]^#[[2]]&, FactorInteger[#]]] <= test) && (Length[FactorInteger[#]]==2))&]], {n, 2, 30}]; Rest[tmp]
PROG
(PARI) factorPP(n)=my(f=factor(n)); vecsort(vector(#f~, i, f[i, 1]^f[i, 2]))
list(n)=my(v=primes(n), t=1, f); for(i=1, n, while(1, f=factorPP(t += 2); if(#f==2 && f[2]/f[1] <= 1+2/v[i], v[i]=t; break))); v \\ Charles R Greathouse IV, Sep 13 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev and Peter J. C. Moses, Sep 13 2013
STATUS
approved