OFFSET
1,1
COMMENTS
All terms have an odd number of digits. - Emeric Deutsch, Mar 09 2010
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..39
EXAMPLE
a(6) = 12721; is a palindromic mountain prime.
. . . . .
. . . . .
. . 7 . .
. . . . .
. . . . .
. . . . .
. . . . .
. 2 . 2 .
1 . . . 1
MAPLE
a := proc (n) local rev, n1: rev := proc (n) local nn: nn := convert(n, base, 10): add(nn[j]*10^(nops(nn)-j), j = 1 .. nops(nn)) end proc: n1 := convert(n, base, 10): if n1[1]=1 and isprime(n) = true and rev(n) = n and n1[1] < n1[2] and n1[2] < n1[3] and n1[3] < n1[4] then n else end if end proc: seq(a(n), n = 1000000 .. 9999999); # this program works only for 7-digit numbers; easily adjustable for other (2k+1)-digit numbers # Emeric Deutsch, Mar 09 2010
PROG
(Python)
from itertools import combinations
from gmpy2 import is_prime
A173071_list = []
for l in range(1, 10):
for i in combinations('23456789', l):
s = '1'+''.join(i)
p = int(s+s[l-1::-1])
if is_prime(p):
A173071_list.append(p) # Chai Wah Wu, Nov 05 2015
CROSSREFS
KEYWORD
nonn,base,fini,full
AUTHOR
Omar E. Pol, Feb 09 2010
EXTENSIONS
More terms from Emeric Deutsch, Mar 09 2010, corrected Mar 19 2010
a(22)-a(27) from Donovan Johnson, Jul 22 2010
STATUS
approved