login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A371623 Sophie Germain primes p whose corresponding safe prime is an anagram of p. 2
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Subsequence of A005384, where p and 2p+1 are both primes and 2p+1 is a permutation of the digits of p. The smallest integer with the property is 10529, which is the 198th Sophie Germain prime, which in turn corresponds to A000040(1287).
Terms cannot begin with decimal digits 5-9, else 2*p+1 has more digits and cannot be an anagram. - Michael S. Branicky, Apr 23 2024
LINKS
EXAMPLE
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.
PROG
(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
CROSSREFS
Sequence in context: A236036 A216489 A120500 * A157487 A203666 A346892
KEYWORD
nonn,base
AUTHOR
Gonzalo Martínez, Mar 29 2024
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 15 14:56 EDT 2024. Contains 375938 sequences. (Running on oeis4.)