OFFSET
1,1
EXAMPLE
3*2^2 + 5*2 + 1 = 23, which is prime. Therefore 2 is in the sequence.
3*4^2 + 5*4 + 1 = 3*23, a prime multiplied by a power of 3. Hence 3 is in the sequence.
MATHEMATICA
a = {}; For[n = 1, n < 130, n++, m = 3*n^2 + 5*n + 1; If[PrimeQ[m], AppendTo[a, n]]; While[IntegerQ[m/3], m = m/3]; If[PrimeQ[m], AppendTo[a, n]]]; Union[a, a]
CROSSREFS
KEYWORD
nonn,less
AUTHOR
J. M. Bergot, Aug 27 2007
EXTENSIONS
Edited, corrected and extended by Stefan Steinerberger, Aug 29 2007
STATUS
approved