cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A052092 Lengths of the palindromic primes from Honaker's sequence A053600.

This page as a plain text file.
%I A052092 #18 Dec 04 2015 04:12:40
%S A052092 1,3,5,9,11,15,19,23,25,31,35,41,45,49,55,59,63,69,75,81,87,93,99,105,
%T A052092 109,113,119,125,129,133,139,145,151,157,161,167,173,179,185,191,195,
%U A052092 201,207,213,219,225,231,237,243,249,255,261,267,273,279,285,291,297
%N A052092 Lengths of the palindromic primes from Honaker's sequence A053600.
%C A052092 Since the terms from a(34) onward are currently only probable primes, the lengths given in this sequence beyond that point are only provisional.
%C A052092 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
%H A052092 Chai Wah Wu, <a href="/A052092/b052092.txt">Table of n, a(n) for n = 0..501</a>
%o A052092 (Python)
%o A052092 from sympy import isprime
%o A052092 A052092_list, l, p = [1], 1, 2
%o A052092 for _ in range(100):
%o A052092     m, ps = 1, str(p)
%o A052092     s = int('1'+ps+'1')
%o A052092     while not isprime(s):
%o A052092         m += 1
%o A052092         ms = str(m)
%o A052092         if ms[0] in '268':
%o A052092             ms = str(int(ms[0])+1) + '0'*(len(ms)-1)
%o A052092             m = int(ms)
%o A052092         if ms[0] in '45':
%o A052092             ms = '7' + '0'*(len(ms)-1)
%o A052092             m = int(ms)
%o A052092         s = int(ms+ps+ms[::-1])
%o A052092     p = s
%o A052092     l += 2*len(ms)
%o A052092     A052092_list.append(l) # _Chai Wah Wu_, Dec 02 2015
%Y A052092 Cf. A052091, A053600, A047076.
%K A052092 nonn,base
%O A052092 0,2
%A A052092 _Patrick De Geest_, Jan 15 2000
%E A052092 Comments from _G. L. Honaker, Jr._, Mar 30 2000
%E A052092 Edited by _T. D. Noe_, Oct 30 2008