The OEIS is supported by the many generous donors to the OEIS Foundation.



Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 60, we have over 367,000 sequences, and we’ve crossed 11,000 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A113613 Beginning with 7, distinct primes such that every partial concatenation is a palindrome. 2
7, 17, 5717, 27175717, 212717571727175717, 8717571727175717212717571727175717, 2327175717271757172127175717271757178717571727175717212717571727175717 (list; graph; refs; listen; history; text; internal format)
From Michael S. Branicky, Aug 09 2022: (Start)
If terms were not required to be distinct, then 7, 7, 7, ... or 7, 17, 17, 17, ... satisfy the requirement.
a(11) has 1132 digits. (End)
Michael S. Branicky, Table of n, a(n) for n = 1..10
7, 717, 7175717, 717571727175717, ... are all palindromes.
from sympy import isprime
from itertools import count, islice, product
def pals(digs):
yield from digs
for d in count(2):
for p in product(digs, repeat=d//2):
left = "".join(p)
for mid in [[""], digs][d%2]:
yield left + mid + left[::-1]
def folds(s): # generator of suffixes of palindromes starting with s
for i in range((len(s)+1)//2, len(s)+1):
for mid in [True, False]:
t = s[:i] + (s[:i-1][::-1] if mid else s[:i][::-1])
if t.startswith(s):
yield t[len(s):]
yield from ("".join(p)+s[::-1] for p in pals("0123456789"))
def agen():
s, seen = "7", {"7"}; yield 7
while True:
for t in folds(s):
if len(t) and t[0] != "0" and t not in seen and isprime(int(t)):
s += t; seen.add(t); yield int(t)
print(list(islice(agen(), 7))) # Michael S. Branicky, Aug 09 2022
Cf. A113612.
Sequence in context: A177366 A138491 A022511 * A070415 A034083 A185455
Amarnath Murthy, Nov 09 2005
Name clarified and a(5) and beyond from Michael S. Branicky, Aug 09 2022

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 2 09:50 EST 2023. Contains 367517 sequences. (Running on oeis4.)