A371623 Sophie Germain primes p whose corresponding safe prime is an anagram of p.
10529, 12959, 32561, 129509, 326159, 1632509, 2653109, 2956301, 3105269, 3126509, 3250619, 3260501, 3578741, 10002959, 10530269, 13296509, 15263009, 15326099, 15630299, 18747593, 18795743, 19475873, 19963259, 25060319, 25099631, 25301609, 26031959, 26095031
Offset: 1
Examples
12959 is a term since it is a prime number such that 2*12959 + 1 = 25919 is also prime, where 25919 is a permutation of the digits of 12959.
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Programs
-
PARI
forprime(p=2, 10^7, if(ispseudoprime(2*p+1) && (vecsort(digits(p)) == vecsort(digits(2*p+1))), print1(p, ", "))) \\ Michel Marcus, Mar 30 2024
-
Python
from itertools import count, islice from sympy import nextprime def A371623_gen(startvalue=1): # generator of terms >= startvalue p = max(startvalue-1,0) while (p:=nextprime(p)): if isprime(q:=p<<1|1) and sorted(str(p))==sorted(str(q)): yield p A371623_list = list(islice(A371623_gen(),10)) # Chai Wah Wu, Apr 22 2024
Comments