OFFSET
1,1
REFERENCES
David Wells, The Penguin Dictionary of Curious and Interesting Numbers (Rev. ed. 1997), p. 154 (entry for 1980).
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
954 - 459 = 495, 19980 - 8991 = 10989.
MATHEMATICA
srdQ[n_]:=Module[{idn=IntegerDigits[n], rn}, rn=FromDigits[Reverse[idn]]; n>rn&&Sort[IntegerDigits[n-rn]]==Sort[idn]]; Select[Range[100000], srdQ] (* Harvey P. Dale, Jun 21 2013 *)
PROG
(PARI) isok(n) = {my(d = digits(n)); diff = my(n - subst(Polrev(d), x, 10)); (diff > 0) && (vecsort(digits(diff)) == vecsort(d)); } \\ Michel Marcus, Sep 04 2015
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Tanya Khovanova, Sep 04 2006
STATUS
approved