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.

Previous Showing 11-11 of 11 results.

A319387 Smallest palindrome p such that n-p is again a palindrome, or n if no such p exists.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 21, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 32, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 43, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 54, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 65, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 76, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 87, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 98, 0
Offset: 0

Views

Author

Markus Sigg, Sep 18 2018

Keywords

Comments

a(n) = n if and only if A262087(n) = 0.

Examples

			a(11) = 0 because 11 = 11 + 0, so 0 is the smallest palindrome in any partitioning of 11 as a sum of two palindromes.
a(21) = 21 because 21 cannot be written as a sum of two palindromes.
		

Crossrefs

Programs

  • Maple
    isP := k -> StringTools[IsPalindrome](convert(k,string)):
    a := NULL:
    for n from 0 to 99 do
       an := n:
       for k from 0 to n/2 do
          if isP(k) and isP(n-k) then an := min(an,k) end if
       end do:
       a := a,an
    end do:
    a;
Previous Showing 11-11 of 11 results.