%I M0522 N0188
%N Numbers x such that 1+3x(x-1) is a ("cuban") prime (cf. A002407).
%D A. J. C. Cunningham, On quasi-Mersennian numbers, Mess. Math., 41 (1912), 119-146.
%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H T. D. Noe, <a href="/A002504/b002504.txt">Table of n, a(n) for n = 1..1000</a>
%e a(1) = 2 since A002407(1)=7=1+3k(k-1) with k=2 is the smallest prime of that form.
%t Select[Range, PrimeQ[1 + 3 # (# - 1)] &] (* _T. D. Noe_, Jan 30 2013 *)
%o (PARI) for(k=1,999,isprime(3*k*(k-1)+1)&print1(k",")) \\ - M. F. Hasler, Nov 28 2007
%Y Cf. A002407, A133431.
%A _N. J. A. Sloane_.
%E Edited, updated (1 is no longer regarded as a prime) and extended by _M. F. Hasler_, Nov 28 2007