%I #71 Dec 06 2019 15:51:56
%S 787,72781818727,787812181218787,72781878787818727,78121818781812187,
%T 78181272727218187,7278781818181878727,7872787812187872787,
%U 727872187212781278727,781272121818121272187,781272727818727272187,781872727212727278187,72121872127872127812127,72727272187278127272727
%N Palindromic primes in base 10 of the form 6*p+1, where p is a palindromic prime in base 10.
%C Conjecture 1: There are infinitely many primes of this form.
%C Conjecture 2: 6 is the only integer k for which palindrome primes of the form k*p+1 exist, where p is a palindromic prime.
%C Conjecture 2 is false. A counterexample: 180 * 101 + 1 = 18181 where 101 and 18181 are palindromic primes and k = 180. - _David A. Corneth_, Nov 01 2018
%C p must have an odd number of digits (since 11 is the only palindrome prime with an even number of digits) and the leading digit of p must be 1, otherwise 6p+1 has an even number of digits. So p must have the form 1...1 and 6p+1 the form 7...7.
%C Some other terms of this sequence: 727872187212781278727, 781272121818121272187, 781272727818727272187, 781872727212727278187, 72121872127872127812127, 72727272187278127272727, 72781872727872727818727, 78127212127872121272187, 78181218181218181218187, 78727272121212127272787, 78787272787278727278787. - _Giovanni Resta_, Oct 31 2018
%C From _Chai Wah Wu_, Dec 06 2019 : (Start)
%C Suppose q = 6p+1 is a term written as q = a0a1a2...a2a1a0 and p = b0b1b2...b2b1b0.
%C The discussion above shows that a0 = 7 and b0 = 1.
%C b_i is either 2 or 3 for i odd and b_i is either 0 or 1 for i even (see MathExchange link).
%C (End)
%H Chai Wah Wu, <a href="/A321210/b321210.txt">Table of n, a(n) for n = 1..10008</a>
%H MathExchange, <a href="https://math.stackexchange.com/questions/2977633/p-and-6p1-both-palindrome-primes-is-131-787-the-only-example">p and 6p+1 both palindrome primes. Is (131/787) the only example?</a>.
%e 787 is in the sequence because 787 = 6*131 + 1, where 131 is a palindromic prime.
%o (PARI) print1(787", " ); for(u=0, 20, z=[[1, 1], [2, 3]]; for(j=1, u-1, z=concat(z, [[0, 9]])); forvec(j=z, for(k=0, 9, n=0; for(m=1, length(j), n=n*10+j[m]); n=n*10+k; forstep(m=length(j), 1, -1, n=n*10+j[m]); if(digits(6*n+1)==Vecrev(digits(6*n+1)), if(ispseudoprime(n)==1, if(ispseudoprime(6*n+1)==1, print1(6*n+1", " )))))))
%o (Python)
%o from sympy import isprime
%o A321210_list = []
%o for i in range(2**20):
%o s = bin(i)[2:]
%o s += s[-2::-1]
%o p = int(s) + int('02'*(len(s)//2)+'0')
%o q = 6*p+1
%o t = str(q)
%o if t == t[::-1] and isprime(p) and isprime(q):
%o A321210_list.append(q) # _Chai Wah Wu_, Dec 06 2019
%Y Cf. A002113, A002385.
%K nonn,base
%O 1,1
%A _Paolo Galliani_, Oct 30 2018
%E a(5)-a(8) from _Giovanni Resta_, Oct 31 2018
%E a(9)-a(14) from _Chai Wah Wu_, Dec 05 2019
|