login
Primes p such that 8p^2 - 7p + 2 is also prime.
2

%I #17 Jan 03 2017 03:03:02

%S 3,5,23,41,59,113,131,173,179,269,281,383,401,431,443,449,461,479,521,

%T 641,653,863,929,941,953,1013,1103,1163,1301,1319,1361,1439,1481,1559,

%U 1583,1871,2003,2213,2309,2411,2609,2693,2711,2729,2801,2903,2909,2969,3041

%N Primes p such that 8p^2 - 7p + 2 is also prime.

%C For any p in this sequence, 2*p*(8p^2 - 7p + 2) has the same nonzero digits as its prime factors in base 2*p-1.

%C Apart from 3 itself, all members of this sequence are congruent to 2 (mod 3). This is because for any number congruent to 1 (mod 3), the expression (8n^2 - 7n + 2) would be a multiple of 3 and hence not prime.

%H Ely Golden, <a href="/A280273/b280273.txt">Table of n, a(n) for n = 1..1000</a>

%t Select[Prime@ Range@ 450, PrimeQ[8 #^2 - 7 # + 2] &] (* _Michael De Vlieger_, Dec 30 2016 *)

%o (SageMath)

%o c=1

%o index=1

%o while(index<=1000):

%o if((is_prime(c))&(is_prime(8*(c**2)-7*c+2))):

%o print(str(index)+" "+str(c))

%o index+=1

%o c+=1

%o print("complete")

%K nonn

%O 1,1

%A _Ely Golden_, Dec 30 2016