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.

A082272 Smallest palindrome m such that n + m (m>0) is also a palindrome, or 0 if no such number exists.

This page as a plain text file.
%I A082272 #8 Jul 24 2014 17:26:29
%S A082272 1,1,1,1,1,1,1,1,2,1,11,99,9,8,7,6,5,4,3,2,1,11,88,9,8,7,6,5,4,3,2,1,
%T A082272 11,77,9,8,7,6,5,4,3,2,1,11,66,9,8,7,6,5,4,3,2,1,11,55,9,8,7,6,5,4,3,
%U A082272 2,1,11,44,9,8,7,6,5,4,3,2,1,11,33,9,8,7,6,5,4,3,2,1,11,22,9,8,7,6,5,4,3
%N A082272 Smallest palindrome m such that n + m (m>0) is also a palindrome, or 0 if no such number exists.
%C A082272 The first occurrence of 0 happens at n = 919.
%e A082272 a(11) = 11, 11 + 11 = 22; a(12) = 99, 99 + 12 = 111; etc.
%o A082272 (PARI) ispal(n) = eval(concat(Vecrev(Str(n)))) == n;
%o A082272 nextpal(k) = k++; while(! ispal(k), k++); k;
%o A082272 a(n) = {m = 1; while (! ispal(n+m), m = nextpal(m)); m;} \\ _Michel Marcus_, Jul 24 2014
%Y A082272 Cf. A082273, A084843.
%K A082272 nonn,base
%O A082272 1,9
%A A082272 _Amarnath Murthy_, Apr 13 2003
%E A082272 Edited by _Patrick De Geest_, Jun 08 2003