OFFSET
2,1
COMMENTS
The sequence is non-monotone.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 2..1000
EXAMPLE
MAPLE
issp:= n-> is(not isprime(n) and numtheory[bigomega](n)=2):
ithsp:= proc(n) option remember; local k; for k from 1+
`if`(n=1, 1, ithsp(n-1)) while not issp(k) do od; k
end:
ps:= proc(i, j) option remember;
ithprime(j)+`if`(i=j, 0, ps(i, j-1))
end:
ss:= proc(i, j) option remember;
ithsp(j)+`if`(i=j, 0, ss(i, j-1))
end:
a:= proc(n) option remember; local i, j, k, l, p, s;
i, j, k, l, p, s:= 1, n, 1, n, ps(1, n), ss(1, n);
do if p=s then return p
elif p<s then i:=i+1; j:=j+1; p:= ps(i, j)
else k:=k+1; l:=l+1; s:= ss(k, l)
fi od
end:
seq(a(n), n=2..50); # Alois P. Heinz, Mar 24 2017
MATHEMATICA
sp=Select[Range[4, 100000], 2==PrimeOmega[#]&]; pr=Prime[Range[PrimePi[Max[sp]]]];
Table[Intersection[(Total/@Partition[pr, k, 1]), Total/@Partition[sp, k, 1]][[1]], {k, 2, 100}}
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Mar 17 2017
EXTENSIONS
More terms from Alois P. Heinz, Mar 24 2017
STATUS
approved