A158526 n and (1 + 2*n + 2*n^2) are primes.
2, 5, 7, 17, 19, 29, 47, 79, 97, 109, 137, 139, 149, 157, 167, 199, 229, 347, 349, 389, 409, 467, 479, 547, 577, 599, 709, 719, 757, 857, 929, 937, 967, 1039, 1069, 1087, 1187, 1229, 1259, 1399, 1409, 1447, 1559, 1579, 1597, 1607, 1657, 1697, 1699, 1709
Offset: 1
Examples
A048395(2)=26=2*13, A048395(5)=305=5*61, A048395(7)=791=7*113.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
Magma
[p: p in PrimesUpTo(2000) | IsPrime(2*p^2+2*p+1)]; // Vincenzo Librandi, Jun 22 2014
-
Mathematica
f[n_]:=PrimeQ[n^2+(n+1)^2];lst={};Do[p=Prime[n];If[f[p],AppendTo[lst,p]],{n,6!}];lst (* Vladimir Joseph Stephan Orlovsky, Oct 27 2009 *)
-
PARI
forprime(p=2,1e4,if(isprime(2*p*(p+1)+1),print1(p","))) \\ Charles R Greathouse IV, Sep 09 2009
Comments