OFFSET
1,1
COMMENTS
In most cases a(n) = A288814(prime(n)) but there are exceptions, e.g., a(37)=213, whereas A288814(37)=248. Other exceptions include a(53), a(67), a(127), a(137), etc. These examples occur when there is a number r such that A001414(r*p) is less than A288814(p).
The strictly increasing subsequence of terms (10, 22, 34, 58, 82, 118, 142, 202, 214, 274, 298, ...) where for all m>n, a(m)>a(n) gives the semiprimes with prime sum of prime factors, A108605. The sequence of the indices of this subsequence (5, 7, 13, 19, 31, 43, 61, 73, 103, 109, 139, 151, ...) gives the greater of twin primes, A006512.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
MATHEMATICA
With[{s = Array[Boole[CompositeQ@ #] Total@ Flatten[ConstantArray[#1, #2] & @@@ FactorInteger@ #] &, 10^4] /. 0 -> ""}, Table[FirstPosition[s, _?(Mod[#, p] == 0 &)][[1]], {p, Prime@ Range@ 56}]] (* Michael De Vlieger, Apr 14 2018 *)
PROG
(PARI) sopfr(k) = my(f=factor(k)); sum(j=1, #f~, f[j, 1]*f[j, 2]);
a(n) = my(pn=prime(n)); forcomposite(c=pn, , if (sopfr(c) % pn == 0, return(c))); \\ Michel Marcus, Jul 03 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Jul 01 2017
STATUS
approved