OFFSET
1,1
COMMENTS
All values of a(n), except {2,3}, are equal to 1 mod 30.
These are also primes p such that both p^2+c and p^2-c are positive primes, for some c, when c is a square, since that requires c = (p-1)^2. Corresponding c values begin {1, 4, 900, 108900, ...}. This relates to a comment at A047222.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
31^2 - 30^2 = 61 and 31^2 + 30^2 = 1861 are both prime.
MATHEMATICA
result = {}; Do[If[PrimeQ[2*Prime[i] - 1] && PrimeQ[2*Prime[i]^2 - 2*Prime[i] + 1], AppendTo[result, Prime[i]]], {i, 1, 10000}]; result
Select[Prime[Range[4000]], AllTrue[{2#-1, 2#^2-2#+1}, PrimeQ]&] (* Harvey P. Dale, Dec 26 2022 *)
PROG
(PARI) is(n)=isprime(2*n-1) && isprime(2*n^2-2*n+1) && isprime(n) \\ Charles R Greathouse IV, Jul 15 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Richard R. Forberg, Jun 30 2016
STATUS
approved