OFFSET
1,1
COMMENTS
Also numbers n such that all eigenvalues of the n X n matrix M_n defined in A176043 are prime. The eigenvalues are 2*n-1, and n-1 with multiplicity n-1.
a(n)^2 = p^2 + q, where both p and q are primes. These are the only squares of this form, and which always yields q > p with a(n) - 1 = p = A005384(n) and 2*a(n) - 1 = q = A005385(n), for the same n. Also: a(n) = q - p; p + q + a(n) = 2q = A194593(n+1); and p*q = A156592 - Richard R. Forberg, Mar 04 2015
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
6-1 = 5 and 2*6-1 = 11 are both prime, so 6 is in the sequence. 7-1 = 6 and 2*7-1 = 13 are not both prime, so 7 is not in the sequence.
p = 3, q = 7; p^2 + q = 16, a(n) = sqrt(16) = 4. - Richard R. Forberg, Mar 04 2015
MAPLE
with(numtheory):for n from 2 to 2000 do:if type((2*n-1), prime)=true and type((n-1), prime)=true then print(n):else fi:od:
MATHEMATICA
Select[Prime[Range[250]], PrimeQ[2#+1]&]+1 (* Harvey P. Dale, Jul 31 2013 *)
PROG
(Magma) [ n: n in [2..1600] | IsPrime(n-1) and IsPrime(2*n-1) ]; // Klaus Brockhaus, Apr 19 2010
(PARI) isok(n) = isprime(n-1) && isprime(2*n-1); \\ Michel Marcus, Apr 06 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Apr 07 2010
EXTENSIONS
Edited and 1482 inserted by Klaus Brockhaus, Apr 19 2010
STATUS
approved