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”).

A109863
Primes arising as the 10's complement of A109862(n).
2
7, 5, 3, 89, 809, 647, 617, 71, 89399, 88589, 87179, 86069, 85259, 84449, 83939, 83639, 83339, 82529, 69197, 67577, 66467, 63737, 27773, 25253, 24443, 23633, 23333, 6761, 5651, 5351, 5051, 2621, 8971799, 8925299, 8917199, 8699969, 8671769, 8543459, 8491949
OFFSET
1,1
COMMENTS
a(n) - 1 is a palindrome. Obviously 7, 5 and 3 are the only palindromic terms. Conjecture: Sequence is infinite.
LINKS
EXAMPLE
353 is a member of A109862 and 647 = 1000 - 353 corresponds to it.
PROG
(Python)
from sympy import isprime
from itertools import product
def tc(n): return 10**len(str(n)) - n
def cond(p): return isprime(p) and isprime(tc(p))
def palcands(digs):
if digs == 1: yield from [2, 3, 5, 7]; return
if digs%2 == 0: yield from [[], [11]][digs==2]; return
for first in "1379":
for p in product("0123456789", repeat=(digs-2)//2):
left = first + "".join(p)
for mid in "0123456789": yield int(left + mid + left[::-1])
def auptod(digs):
return [tc(p) for d in range(1, digs+1) for p in palcands(d) if cond(p)]
print(auptod(7)) # Michael S. Branicky, Jul 05 2021
CROSSREFS
Cf. A109862.
Sequence in context: A090289 A160670 A145985 * A179177 A021574 A021061
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Jul 08 2005
EXTENSIONS
More terms from Joshua Zucker, May 08 2006
Corrected by T. D. Noe, Nov 15 2006
a(37) and beyond from Michael S. Branicky, Jul 05 2021
STATUS
approved