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

 

Logo


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
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, 66, 67, 76, 77, 78, 87, 88, 89, 98, 99, 100, 101, 102, 110, 111, 112, 120, 121, 122, 130, 131, 132, 140, 141, 142, 150, 151, 152, 160, 161, 162, 170, 171, 172, 180 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

a(n) = A178403(n) for n < 48. [Reinhard Zumkeller, May 27 2010]

LINKS

Table of n, a(n) for n=1..61.

MAPLE

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

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

  nL:= nops(L);

  r:= add(L[i]*10^(nL-i), i=1..nL);

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

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

end proc:

select(filter, [$0..1000]); # Robert Israel, Aug 26 2014

MATHEMATICA

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 *)

PROG

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

CROSSREFS

Sequence in context: A252490 A178403 A134336 * A032981 A136332 A023766

Adjacent sequences:  A131204 A131205 A131206 * A131208 A131209 A131210

KEYWORD

nonn,base

AUTHOR

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

EXTENSIONS

Corrected by Harvey P. Dale, Aug 22 2014

STATUS

approved

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 03:11 EDT 2021. Contains 343198 sequences. (Running on oeis4.)