cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A239788 Numbers n such that 3n^3 +/- 1 are twin primes.

This page as a plain text file.
%I A239788 #14 Sep 08 2022 08:46:07
%S A239788 4,10,14,36,54,64,70,86,150,174,176,180,200,306,384,440,494,650,706,
%T A239788 800,824,924,976,980,986,1020,1026,1054,1360,1464,1504,1506,1536,1564,
%U A239788 1604,1680,1724,1736,2066,2076,2116,2134,2136,2166,2200,2220,2314,2380,2456
%N A239788 Numbers n such that 3n^3 +/- 1 are twin primes.
%C A239788 Numbers in this sequence are all even.
%H A239788 Vincenzo Librandi, <a href="/A239788/b239788.txt">Table of n, a(n) for n = 1..1000</a>
%e A239788 3*4^3-1 = 191 is prime and 3*4^3+1 = 193 is prime. Thus, 4 is a member of this sequence.
%t A239788 Select[Range[5000], PrimeQ[3 #^3 - 1] && PrimeQ[3 #^3 + 1]&] (* _Vincenzo Librandi_, Mar 29 2014 *)
%o A239788 (Python)
%o A239788 import sympy
%o A239788 from sympy import isprime
%o A239788 {print(n) for n in range(10**4) if isprime(3*(n**3)+1) and isprime(3*(n**3)-1)}
%o A239788 (PARI) s=[]; for(n=1, 3000, if(isprime(3*n^3-1) && isprime(3*n^3+1), s=concat(s, n))); s \\ _Colin Barker_, Mar 27 2014
%o A239788 (Magma) [n: n in [0..5000] | IsPrime(3*n^3-1) and IsPrime(3*n^3+1)]; // _Vincenzo Librandi_, Mar 29 2014
%Y A239788 Cf. A116954, A239787.
%K A239788 nonn,easy
%O A239788 1,1
%A A239788 _Derek Orr_, Mar 26 2014