From: Artur on
Dear Mathethica Gurus,

I'm looking for quick prcedure for finding trinoamials x^n +Ax +B for
large {n,50,1000} range which have cubic unreducible factor (x^3+p x^2+q
x+r).
My prcedure is ver slowly and for range n 183-190 need whole day
Here is
Timing[aa = {};
Do[Print[n];
kk = CoefficientList[
PolynomialRemainder[x^n + a x + b, x^3 + p x^2 + q x + r, x], x];
gg = Solve[{kk[[1]] == 0, kk[[2]] == 0, kk[[3]] == 0}, {a, b, r}];
rr = (r /. gg[[1]])[[1]][[1]]; rr = rr /. #1 -> y;(*Print[rr];*)
Do[Do[kk = FactorList[rr];
If[Length[kk] > 2,
Do[kkk = kk[[m]][[1]];
If[Length[kkk] == 2, rrr = Solve[kkk == 0, y];(*Print[{-1, r->y/.
rrr[[1]]}];*)
kkkk = CoefficientList[
PolynomialRemainder[
x^n + a x + b, (x^3 + p x^2 + q x + r) /. r -> y /.
rrr[[1]], x], x];(*Print[kkkk];*)
bb = (b /. Solve[kkkk[[1]] == 0, b])[[1]];
aaa = (a /. Solve[kkkk[[2]] == 0, a])[[1]];(*Print[{bb,aaa}];*)
If[(bb != 0) && (aaa != 0),
AppendTo[
aa, {n, p, q, y /. rrr[[1]], x^n + aaa x + bb,
Factor[x^n + aaa x + bb]}];
Print[{n, p, q, kkkk, kk}]]], {m, 2, Length[kk]}]], {p, -30,
30}], {q, -100, 100}], {n,
183, 1000}]; aa]

I will be greatfuull for any help!
Largest know trinomials are x^52+2^34*3*53x+2^35*103 which have cubic
factor x^3+2x^2+4x+4
I don't find any more from 53 up to n=186.
Best wishes
Artur