login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A330202
Palindromic primes p in base 10 such that 6*p+1 is also a palindromic prime in base 10.
1
131, 12130303121, 131302030203131, 12130313131303121, 13020303130302031, 13030212121203031, 1213130303030313121, 1312131302031312131, 121312031202130213121, 130212020303020212031, 130212121303121212031, 130312121202121213031, 12020312021312021302021, 12121212031213021212121
OFFSET
1,1
COMMENTS
Each term starts with either 12 or 13. If a term is written as a0a1a2...a2a1a0, then a_i is either 0 or 1 when i is even and a_i is either 2 or 3 when i is odd (see A321210).
FORMULA
a(n) = (A321210(n)-1)/6.
PROG
(Python)
from sympy import isprime
A330202_list = []
for i in range(2**20):
s = bin(i)[2:]
s += s[-2::-1]
p = int(s) + int('02'*(len(s)//2)+'0')
q = 6*p+1
t = str(q)
if t == t[::-1] and isprime(p) and isprime(q):
A330202_list.append(p)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Chai Wah Wu, Dec 05 2019
STATUS
approved