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!)
A121970 Numbers n such that if you subtract n from its reversal you get a positive number with the same digits as n. 0

%I #9 Mar 14 2015 18:29:13

%S 459,1467,1692,3285,8019,14967,16992,23706,23769,24894,26496,32796,

%T 32985,37206,40698,44397,45207,49599,62298,80199,80919,104697,106992,

%U 108729,108972,127809,134667,135378,135774,136818,136962,145827,147492

%N Numbers n such that if you subtract n from its reversal you get a positive number with the same digits as n.

%C If negative numbers are included then the sequence is the above together with its reversals. - _Robert G. Wilson v_, Sep 11 2006

%H Kevin Browne, <a href="http://www.mathpages.com/home/kmath136/kmath136.htm">Subtracting the Reversal</a>.

%e 459 is a member because 954 - 459 = 495; 16992 is a member because 29961 - 16992 = 12969.

%t Select[Table[n, {n, 200000}], ToExpression[StringReverse[ToString[ # ]]] - # > 0 && Sort[IntegerDigits[ # ]] == Sort[IntegerDigits[ToExpression[StringReverse[ToString[ # ]]] - # ]] &]

%t fQ[n_] := Block[{id = IntegerDigits@n}, rev = FromDigits@ Reverse@id; rev > n && Sort@id == Sort@IntegerDigits[rev - n]]; Select[ Range@153971, fQ@# &] (* _Robert G. Wilson v_, Sep 11 2006 *)

%Y Cf. A055161, A121969.

%K base,nonn

%O 1,1

%A _Tanya Khovanova_, Sep 04 2006

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 March 28 04:13 EDT 2024. Contains 371235 sequences. (Running on oeis4.)