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.

A092058 Numbers n such that 2*prime(n)^2 - 1 is prime.

Original entry on oeis.org

1, 2, 4, 5, 6, 7, 13, 14, 17, 21, 29, 30, 31, 33, 37, 41, 42, 45, 46, 47, 54, 56, 59, 62, 64, 71, 73, 75, 80, 81, 84, 93, 103, 105, 106, 113, 114, 120, 126, 131, 132, 134, 139, 141, 144, 145, 146, 148, 159, 160, 169, 175, 179, 183, 185, 186, 188, 192, 212, 217, 220
Offset: 1

Views

Author

mohammed Bouayoun (mohammed.bouayoun(AT)sanef.com), Feb 19 2004

Keywords

Examples

			2*prime(1)^2 - 1 = 7 is prime so a(1)=1;
2*prime(2)^2 - 1 = 17 is prime so a(2)=2;
2*prime(3)^2 - 1 = 97 is not prime;
2*prime(4)^2 - 1 = 241 is prime so a(3)=4.
		

Crossrefs

Cf. A092057.

Programs

  • Magma
    [n: n in [1..220]| IsPrime(2*NthPrime(n)^2-1)]; // Vincenzo Librandi, Jan 18 2013
  • Mathematica
    Select[Range[500],PrimeQ[2Prime[#]^2-1]&] (* Harvey P. Dale, Dec 13 2010 *)
  • PARI
    for (i=1,300,if(isprime(2*prime(i)^2-1),print1(i,",")))
    

Formula

A106483(n) = prime(a(n)) . - R. J. Mathar, Aug 20 2019