login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Numbers n such that 3n^3 - 1 is prime.
4

%I #14 Sep 08 2022 08:46:07

%S 1,2,4,6,10,14,26,34,36,40,44,54,64,66,70,84,86,92,100,102,116,122,

%T 134,146,150,152,156,160,172,174,176,180,190,194,200,216,252,254,262,

%U 274,306,320,322,334,336,350,352,374,384,402,414,440,442,444,460

%N Numbers n such that 3n^3 - 1 is prime.

%C All the numbers in this sequence, excluding a(1), are even.

%H Vincenzo Librandi, <a href="/A239787/b239787.txt">Table of n, a(n) for n = 1..1000</a>

%e 3*2^3 - 1 = 23 is prime. Thus, 2 is a member of this sequence.

%t Select[Range[1000], PrimeQ[3 #^3 - 1] &] (* _Vincenzo Librandi_, Mar 29 2014 *)

%o (Python)

%o import sympy

%o from sympy import isprime

%o {print(n) for n in range(10**3) if isprime(3*(n**3)-1)}

%o (PARI) s=[]; for(n=1, 1000, if(isprime(3*n^3-1), s=concat(s, n))); s \\ _Colin Barker_, Mar 27 2014

%o (Magma) [n: n in [0..1000] | IsPrime(3*n^3-1)]; // _Vincenzo Librandi_, Mar 29 2014

%Y Cf. A116954.

%K nonn,easy

%O 1,2

%A _Derek Orr_, Mar 26 2014