The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A131207 Nonnegative integers n such that the difference between n and its reverse is a palindrome. 1

%I

%S 0,1,2,3,4,5,6,7,8,9,10,11,12,21,22,23,32,33,34,43,44,45,54,55,56,65,

%T 66,67,76,77,78,87,88,89,98,99,100,101,102,110,111,112,120,121,122,

%U 130,131,132,140,141,142,150,151,152,160,161,162,170,171,172,180

%N Nonnegative integers n such that the difference between n and its reverse is a palindrome.

%C a(n) = A178403(n) for n < 48. [_Reinhard Zumkeller_, May 27 2010]

%p filter:= proc(n) local L,nL,r;

%p L:= convert(n,base,10);

%p nL:= nops(L);

%p L:= convert(abs(n-r),base,10);

%p evalb(L = ListTools:-Reverse(L))

%p end proc:

%p select(filter, [\$0..1000]); # _Robert Israel_, Aug 26 2014

%t revpalQ[n_]:=Module[{diff=IntegerDigits[Abs[n-FromDigits[Reverse[ IntegerDigits[ n]]]]]},diff==Reverse[diff]]; Select[Range[ 0,400],revpalQ] (* _Harvey P. Dale_, Aug 22 2014 *)

%o (Java) for(i = 1; i <=1000; i++){ n = Math.abs(i - reverseNumber(i)); if(n == reverseNumber(n)){ System.out.println(i); } }

%K nonn,base

%O 1,3

%A Rachit Agrawal (rachit_agrawal(AT)daiict.ac.in), Oct 23 2007

%E Corrected by _Harvey P. Dale_, Aug 22 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 6 22:42 EST 2021. Contains 349567 sequences. (Running on oeis4.)