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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A319387 Smallest palindrome p such that n-p is again a palindrome, or n if no such p exists. 1
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,14
COMMENTS
a(n) = n if and only if A262087(n) = 0.
LINKS
EXAMPLE
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.
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;
CROSSREFS
Sequence in context: A114800 A079170 A330927 * A076105 A094280 A082323
KEYWORD
nonn,base,look
AUTHOR
Markus Sigg, Sep 18 2018
STATUS
approved

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 April 24 07:28 EDT 2024. Contains 371922 sequences. (Running on oeis4.)