A099052 All palindromes of length greater than 1 in the decimal expansion of e, ordered by the ending position of the palindrome. Multiple terms ending at the same position are ordered by the starting position of the palindrome.
828, 18281, 818, 28182, 8281828, 828, 353, 747, 66, 2662, 77, 757, 99, 999, 99, 959, 595, 66, 9669, 696, 676, 77, 2772, 66, 303, 353, 535, 525, 66, 66, 919, 39193, 99, 181, 66, 33, 595, 323, 232, 434, 94349, 323, 33, 88, 525, 101, 11, 383, 99, 88, 4884, 44
Offset: 1
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A001113 (e).
Programs
-
Python
from sympy import E def ispal(s): return all(s[i] == s[-1-i] for i in range(len(s)//2)) def aupto(maxdigs): digits_e = str(E.n(maxdigs+4))[2:] return [int(s) for s in (digits_e[j:k+1] for k in range(1, maxdigs) for j in range(k)) if s[0] != '0' and ispal(s)] print(aupto(240)) # Michael S. Branicky, Jun 28 2021
Extensions
Offset changed and a(50) and beyond from Michael S. Branicky, Jun 28 2021