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.
%I A245639 #21 May 22 2025 10:21:40 %S A245639 2,3,5,11,17,19,23,31,59,67,79,89,103,107,137,173,193,229,233,241,257, %T A245639 263,271,311,317,353,359,383,409,431,479,509,521,523,541,563,569,577, %U A245639 593,599,613,641,709,739,751,787,829,887,907,919,947,971,983,1033 %N A245639 Prime numbers P such that 8*P^2-1 is also prime. %H A245639 Pierre CAMI, <a href="/A245639/b245639.txt">Table of n, a(n) for n = 1..10000</a> %e A245639 8*2^2-1=31 prime so a(1)=2. %e A245639 8*3^2-1=71 prime so a(2)=3. %e A245639 8*5^2-1=199 prime so a(3)=5. %e A245639 8*7^2-1=391 composite. %e A245639 8*11^2-1=967 prime so a(4)=11. %t A245639 Reap[Do[p = Prime[n]; If[PrimeQ[8*p^2-1], Sow[p]], {n, 1, 200}]][[2, 1]] (* _Jean-François Alcover_, Jul 28 2014 *) %t A245639 Select[Prime[Range[200]], PrimeQ[8 #^2 - 1] &] (* _Vincenzo Librandi_, Sep 07 2014 *) %o A245639 (PFGW & SCRIPT) %o A245639 SCRIPT %o A245639 DIM n,0 %o A245639 DIMS t %o A245639 OPENFILEOUT myf,a(n).txt %o A245639 LABEL loop1 %o A245639 SET n,n+1 %o A245639 SETS t,%d,%d\,;n;p(n) %o A245639 PRP 8*p(n)^2-1,t %o A245639 IF ISPRP THEN GOTO a %o A245639 GOTO loop1 %o A245639 LABEL a %o A245639 WRITE myf,t %o A245639 GOTO loop1 %o A245639 (PARI) select(p->isprime(8*p^2-1), primes(300)) \\ _Colin Barker_, Jul 28 2014 %o A245639 (Python) %o A245639 import sympy %o A245639 from sympy import isprime %o A245639 from sympy import prime %o A245639 for n in range(1,10**3): %o A245639 p = prime(n) %o A245639 if isprime(8*p**2-1): %o A245639 print(p,end=', ') %o A245639 # _Derek Orr_, Aug 13 2014 %o A245639 (Magma) [p: p in PrimesUpTo(1500)| IsPrime(8*p^2-1)]; // _Vincenzo Librandi_, Sep 07 2014 %Y A245639 Cf. A245640, A245641, A245642, A245643. %K A245639 nonn,easy %O A245639 1,1 %A A245639 _Pierre CAMI_, Jul 28 2014