Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A052092
Lengths of the palindromic primes from Honaker's sequence A053600.
5
1, 3, 5, 9, 11, 15, 19, 23, 25, 31, 35, 41, 45, 49, 55, 59, 63, 69, 75, 81, 87, 93, 99, 105, 109, 113, 119, 125, 129, 133, 139, 145, 151, 157, 161, 167, 173, 179, 185, 191, 195, 201, 207, 213, 219, 225, 231, 237, 243, 249, 255, 261, 267, 273, 279, 285, 291, 297
OFFSET
0,2
COMMENTS
Since the terms from a(34) onward are currently only probable primes, the lengths given in this sequence beyond that point are only provisional.
For n > 0, a(n) = a(n-1)+2*m where m is the number of digits of A052091(n). - Chai Wah Wu, Dec 03 2015
LINKS
PROG
(Python)
from sympy import isprime
A052092_list, l, p = [1], 1, 2
for _ in range(100):
m, ps = 1, str(p)
s = int('1'+ps+'1')
while not isprime(s):
m += 1
ms = str(m)
if ms[0] in '268':
ms = str(int(ms[0])+1) + '0'*(len(ms)-1)
m = int(ms)
if ms[0] in '45':
ms = '7' + '0'*(len(ms)-1)
m = int(ms)
s = int(ms+ps+ms[::-1])
p = s
l += 2*len(ms)
A052092_list.append(l) # Chai Wah Wu, Dec 02 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Jan 15 2000
EXTENSIONS
Comments from G. L. Honaker, Jr., Mar 30 2000
Edited by T. D. Noe, Oct 30 2008
STATUS
approved