%I #17 Dec 04 2015 04:12:32
%S 2,7,3,33,9,30,18,92,3,133,18,117,17,15,346,93,33,180,120,194,126,336,
%T 331,330,95,12,118,369,39,32,165,313,165,134,13,149,195,145,158,720,
%U 18,396,193,102,737,964,722,156,106,395,945,303,310,113,150,303,715,123
%N Left parts needed for the construction of the palindromic prime pyramid starting with 2.
%C Each term is the smallest to have the previous term as a centered substring, beginning with the smallest palindromic prime 2. The right parts are the reversals of the above terms leading zeros included. The terms from a(34) onward currently correspond only to strong pseudoprimes.
%C For n > 0, the leftmost (most significant) digit of a(n) is either 1, 3, 7 or 9. - _Chai Wah Wu_, Dec 02 2015
%H Chai Wah Wu, <a href="/A052091/b052091.txt">Table of n, a(n) for n = 0..501</a>
%H P. De Geest, <a href="http://www.worldofnumbers.com/palprim3.htm">World!Of Palindromic Primes, Page 3</a>
%e Start with 2; add 7 gives 727; add 3 gives 37273; add 33 gives 333727333; etc.
%o (Python)
%o from sympy import isprime
%o A052091_list, p = [2], 2
%o for _ in range(30):
%o m, ps = 1, str(p)
%o s = int('1'+ps+'1')
%o while not isprime(s):
%o m += 1
%o ms = str(m)
%o if ms[0] in '268':
%o ms = str(int(ms[0])+1) + '0'*(len(ms)-1)
%o m = int(ms)
%o if ms[0] in '45':
%o ms = '7' + '0'*(len(ms)-1)
%o m = int(ms)
%o s = int(ms+ps+ms[::-1])
%o p = s
%o A052091_list.append(m) # _Chai Wah Wu_, Dec 02 2015
%Y Cf. A053600, A052092, A047076.
%K nonn,base
%O 0,1
%A _Patrick De Geest_, Jan 15 2000
%E Comments from _G. L. Honaker, Jr._, Mar 30 2000
|