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.

Showing 1-3 of 3 results.

A347400 Lexicographically earliest sequence of distinct terms > 0 such that concatenating n to a(n) forms a palindrome in base 10.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 101, 11, 21, 31, 41, 51, 61, 71, 81, 91, 102, 12, 22, 32, 42, 52, 62, 72, 82, 92, 103, 13, 23, 33, 43, 53, 63, 73, 83, 93, 104, 14, 24, 34, 44, 54, 64, 74, 84, 94, 105, 15, 25, 35, 45, 55, 65, 75, 85, 95, 106, 16, 26, 36, 46, 56, 66, 76, 86, 96, 107, 17, 27, 37, 47, 57
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Aug 30 2021

Keywords

Examples

			For n = 8 we have a(8) = 8 and 88 is a palindrome in base 10;
for n = 9 we have a(9) = 9 and 99 is a palindrome in base 10;
for n = 10 we have a(10) = 101 and 10101 is a palindrome in base 10;
for n = 11 we have a(11) = 11 and 1111 is a palindrome in base 10;
for n = 12 we have a(12) = 21 and 1221 is a palindrome in base 10; etc.
		

Crossrefs

Programs

  • Python
    def ispal(s): return s == s[::-1]
    def aupton(terms):
        alst, seen = [1], {1}
        for n in range(2, terms+1):
            an = 1
            while an in seen or not ispal(str(n) + str(an)): an += 1
            alst.append(an); seen.add(an)
        return alst
    print(aupton(200)) # Michael S. Branicky, Aug 30 2021

A347401 Lexicographically earliest sequence of distinct terms > 0 such that the sum n + a(n) forms a palindrome in base 10.

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 15, 14, 13, 12, 11, 10, 9, 8, 7, 17, 16, 26, 25, 24, 23, 22, 21, 20, 19, 18, 28, 27, 37, 36, 35, 34, 33, 32, 31, 30, 29, 39, 38, 48, 47, 46, 45, 44, 43, 42, 41, 40, 50, 49, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 80, 79, 78, 77, 76, 75, 74, 73
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Aug 30 2021

Keywords

Examples

			For n = 4 we have a(4) = 4 and 4 + 4 = 8 is a palindrome in base 10;
for n = 5 we have a(5) = 6 and 5 + 6 = 11 is a palindrome in base 10;
for n = 6 we have a(6) = 5 and 6 + 5 = 11 is a palindrome in base 10;
for n = 7 we have a(7) = 15 and 7 + 15 = 22 is a palindrome in base 10;
for n = 8 we have a(8) = 14 and 8 + 14 = 22 is a palindrome in base 10; etc.
		

Crossrefs

Programs

  • Python
    def ispal(n): s = str(n); return s == s[::-1]
    def aupton(terms):
        alst, seen = [1], {1}
        for n in range(2, terms+1):
            an = 1
            while an in seen or not ispal(n + an): an += 1
            alst.append(an); seen.add(an)
        return alst
    print(aupton(200)) # Michael S. Branicky, Aug 30 2021

A376856 a(1) = 1; for n > 1, a(n) is the smallest unused positive number such that a(n), |a(n) - a(n-1)| and a(1) + ... +a(n) are all palindromes.

Original entry on oeis.org

1, 2, 3, 5, 11, 22, 33, 44, 121, 222, 101, 202, 454, 1221, 2222, 1001, 2002, 4554, 12221, 22222, 10001, 20002, 45554, 122221, 222222, 100001, 200002, 455554, 1222221, 2222222, 1000001, 2000002, 4555554, 12222221, 22222222, 10000001, 20000002, 45555554, 122222221, 222222222, 100000001, 200000002, 455555554, 1222222221, 2222222222, 1000000001
Offset: 1

Views

Author

Scott R. Shannon, Oct 06 2024

Keywords

Comments

The sequence is infinite as from a(13) onward a repetitive pattern of five numbers appears, 45...54, 12...21, 22...22, 10...01, 20...02, all of which grow by one extra digit each iteration.

Examples

			a(9) = 121 as 121 is a palindrome, |121 - 44| = 77 is a palindrome, and 1 + 2 + 3 + 5 + 11 + 22 + 33 + 44 + 121 = 242 is a palindrome.
		

Crossrefs

Showing 1-3 of 3 results.