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.

A355148 Numbers that are the concatenation of two palindromes and that have exactly two palindromic factors, all with the same number of decimal digits.

Original entry on oeis.org

12, 14, 15, 16, 18, 21, 24, 25, 27, 28, 32, 35, 36, 42, 45, 48, 49, 54, 56, 63, 64, 72, 81, 3388, 7744, 101787, 101808, 111888, 151848, 212565, 212898, 232656, 313464, 313575, 353868, 383595, 383838, 414585, 434676, 454545, 505808, 515595, 525252, 555888
Offset: 1

Views

Author

Nicolas Bělohoubek, Jun 21 2022

Keywords

Comments

All numbers of form (4/45)*(9*100^d - 29*10^d + 20) are terms (see example).
Also numbers of form (7/18)*(100^d - 13*10^d + 12) and are also terms (d>1) and of form (4/45)*(4*100^d - 19*10^d + 15) (d>1).
From Chai Wah Wu, Aug 23 2022: (Start)
Terms with 2 decompositions:
12 = 3*4 = 2*6
16 = 4*4 = 2*8
18 = 2*9 = 3*6
24 = 4*6 = 3*8
36 = 4*9 = 6*6
153535351846464648 = 189828981*808808808 = 172727271*888888888
182919281817080718 = 303303303*603090306 = 201030102*909909909
183838381816161618 = 303060303*606606606 = 202040202*909909909
185676581814323418 = 306090603*606606606 = 204060402*909909909
192919291807080708 = 303303303*636060636 = 212020212*909909909
193838391806161608 = 303303303*639090936 = 213030312*909909909
283919382716080617 = 312030213*909909909 = 303303303*936090639
293656392403040304 = 461262164*636636636 = 363363363*808161808
293919392706080607 = 323020323*909909909 = 303303303*969060969
365838563634161436 = 603090306*606606606 = 402060204*909909909
385838583614161416 = 606606606*636060636 = 424040424*909909909
387676783612323216 = 606606606*639090936 = 426060624*909909909
567838765432161234 = 624060426*909909909 = 606606606*936090639
587838785412161214 = 646040646*909909909 = 606606606*969060969
Conjecture: these are an infinite number of such terms.
The following term has 3 decompositions:
113131311886868688 = 279747972*404404404 = 254545452*444444444 = 252252252*448484844.
(End)
A subsequence of this sequence is {s(k)} where s(k) = (202/10989)*t(k)*u(k), t(k) = 10^(6*k + 3) - 1 and u(k) = 2099*10^(6*k + 1) + 988. s(k) can be decomposed in 2 different ways: the first is (202/333)*t(k) and (1/33)*u(k); the second is (101/111)*t(k) and (2/99)*u(k). And since {s(k)} is an infinite sequence, its existence proves Chai Wah Wu's conjecture to be true. - Nicolas Bělohoubek, May 20 2024

Examples

			42 is the concatenation of 4 and 2, and is also 6*7 (all 1 digit).
3388 is the concatenation of 33 and 88, and is also 44*77 (all 2 digits).
414585 is the concatenation of 414 and 585, and is also 555*747 (all 3 digits).
131080 = 232*565 is not a term since 080 begins with 0 and hence is not a three-digit palindromic number.
79974224 = 8998*8888, 7999742224 = 89998*88888, 799997422224 = 899998*888888 (see comments).
		

Programs

  • Python
    from sympy import divisors
    from itertools import count, islice, product
    def ispal(s): return s == s[::-1]
    def pals(d, start0=False): # generates palindromic strings with d digits
        digits = "0123456789"
        if d == 1: yield from "0"*int(start0) + "123456789"; return
        for p in product(digits, repeat=d//2):
            if not start0 and p[0] == "0": continue
            left = "".join(p); right = left[::-1]
            for mid in [[""], digits][d%2]: yield left + mid + right
    def agen(): # generator of terms
        for d in count(1):
            found = set()
            for p1 in pals(d):
                for p2 in pals(d):
                    p = int(p1)*int(p2)
                    s = str(p)
                    if len(s) != 2*d: continue
                    if ispal(s[:d]) and s[d] != "0" and ispal(s[d:]):
                        found.add(p)
            yield from sorted(found)
    print(list(islice(agen(), 51))) # Michael S. Branicky, Jun 21 2022