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.

A111051 Numbers m such that 3*m^2 + 1 is prime.

Original entry on oeis.org

2, 6, 8, 12, 16, 20, 22, 26, 34, 36, 40, 58, 64, 68, 78, 82, 84, 86, 98, 112, 120, 126, 142, 146, 148, 152, 156, 160, 168, 188, 190, 194, 196, 208, 216, 218, 222, 238, 240, 244, 246, 254, 264, 272, 282, 286, 294, 300, 302, 306, 308, 316, 320, 330, 338, 344, 348
Offset: 1

Views

Author

Parthasarathy Nambi, Oct 06 2005

Keywords

Comments

The resulting primes are the generalized cuban primes of the form (x^3-y^3)/(x-y), x=y+2 (see A002648). - Jani Melik, Jul 18 2007

Examples

			1 + 3*2^2 = 13 = A002648(1) is the 1st prime of this form, so a(1) = 2.
1 + 3*6^2 = 109 = A002648(2) is the 2nd prime of this form, so a(2) = 6.
1 + 3*8^2 = 193 = A002648(3) is the 3rd prime of this form, so a(3) = 8.
If m=98 then 3*m^2 + 1 = 28813 = A002648(19) is prime (the 19th of this form), so 98 is a term (the 19th).
		

Crossrefs

Programs

  • Maple
    ts_kubpra_ind:=proc(n) local i, tren, ans; ans:=[ ]: for i from 0 to n do tren:=1+3*i^2: if (isprime(tren)='true') then ans:=[ op(ans),i ] fi od: RETURN(ans); end: ts_kubpra_ind(2000); # Jani Melik, Jul 18 2007
  • Mathematica
    Select[Range[400],PrimeQ[3#^2+1]&] (* Harvey P. Dale, Jul 17 2016 *)
  • PARI
    is(n)=isprime(3*n^2+1) \\ Charles R Greathouse IV, Feb 07 2017

Formula

a(n) = sqrt((A002648(n)-1)/3). - Zak Seidov, Feb 04 2016

Extensions

More terms from Jani Melik, Jul 18 2007
Edited by N. J. A. Sloane, Sep 28 2007