SELECT k
FROM (SELECT n * (n + 1) / 2 k
FROM (SELECT LEVEL + 285 n
FROM DUAL
CONNECT BY LEVEL < 100000))
WHERE k > 40755
INTERSECT
SELECT k
FROM (SELECT n * (3 * n - 1) / 2 k
FROM (SELECT LEVEL + 165 n
FROM DUAL
CONNECT BY LEVEL < 100000))
(
Read more... )