login
A087995
Base-10 palindromes that cannot be formed by performing reverse-and-add operations on any previous nonpalindromic positive integers.
0
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 111, 131, 151, 171, 191, 212, 232, 252, 272, 292, 313, 333, 353, 373, 393, 414, 434, 454, 474, 494, 515, 535, 555, 575, 595, 616, 636, 656, 676, 696, 717, 737, 757, 777, 797, 818, 838, 858, 878, 898, 919, 939, 959, 979, 999
OFFSET
1,3
EXAMPLE
a(11) = 111 because 111 cannot be produced by performing reverse-and-add operations on any number prior to 111 that is not already a palindrome.
MAPLE
reverse := proc (d) local n, m; m := 0; n := d; while n>0 do m := m*10+(n mod 10); n := (n-(n mod 10))/10; od; m; end; isPalindromic := proc (n) if (n=reverse(n)) then true; else false; fi; end; revAddPal := proc (n) local m, i; i := 0; m := n; while not(isPalindromic(m)) and (i<10^2) do i := i+1; m := m+reverse(m); od; isPalindromic(m), m, i; end; revAddPalSeq2 := proc(numTerms) local i, sPals, allPals, r; sPals := {}; allPals := {}; for i from 0 to numTerms do if not(isPalindromic(i)) then r := [revAddPal(i)]; if r[1] then sPals := sPals union {r[2]}; fi; else allPals := allPals union {i}; fi; od; allPals minus sPals; end; revAddPalSeq2(1000);
CROSSREFS
Sequence in context: A056143 A106003 A283868 * A082232 A117228 A032567
KEYWORD
base,nonn
AUTHOR
Chuck Seggelin (barkeep(AT)plastereddragon.com), Oct 28 2003
STATUS
approved