%I #6 Mar 30 2012 17:30:19
%S 0,1,2,3,4,5,6,7,8,9,11,20,31,42,53,64,75,86,97,108,22,31,40,51,62,73,
%T 84,95,106,117,33,42,51,60,71,82,93,104,115,126,44,53,62,71,80,91,102,
%U 113,124,135,55,64,73,82,91,100,111,122,133,144,66,75,84,93,102,111,120,131
%N Each term describes the ordinal number of its position in the sequence, by a summation of the numerals in that ordinal number and then by the differences between each contiguous pair of the numerals in the order in which they appear.
%C The number of times f(n)=k is represented is: 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, ..., . As an example 11 is 1 since only 10 -> 11.
%C Further, the least f(n) to equal k beginning at 0: 10, 1, 31, 933, 1233, 8222, 12214, 10212, 14212, ..., . Examples, f(12) = f(21) = 31, f(252) = f(414) = f(630) = 933, f(147) = f(363) = f(525) = f(741) = 1233, f(1313) = f(2024) = f(2420) = f(3131) = f(4202) = 8222, f(1326) = f(2451) = f(3126) = f(3540) = f(4215) = f(5340) = 12214, f(1324) = f(1342) = f(2431) = f(3124) = f(4213) = f(4231) = f(5320) = 10212, f(1346) = f(2435) = f(2453) = f(3542) = f(4235) = f(5324) = f(5342) = f(6431) = 14212, ..., .
%C n->f(n) beginning with 10: 10, 11, 20, 22, 40, 44, 80, 88, 160, 756, 1821, 12761, 171515, 2066444, 26260200, 184446220, 3174002402, 23263402242, 301143142022, 2331031232220, 24102132111002, ..., .
%e The ordinal number 128 is represented as "1116" (11_16): where 1+2+8="11"; where the difference between 1 and 2 is "1"; and where the difference between 2 and 8 is "6". Conversely, the term "933" may represent the ordinal number 630: where "9" is the sum of 6+3+0; where "3" is the difference between 6 and 3 [6-3="3"]; and where "3" is the difference between 3 and 0.
%t f[n_] := Block[{id = IntegerDigits@n}, FromDigits@ Join[ IntegerDigits[ Plus @@ id], Abs[ Most@ id - Rest@ id]]]; Table[ f@n, {n, 0, 67}]
%K easy,nonn
%O 0,3
%A Daniel Mark Pech (pnpmacknam(AT)uswest.net), May 02 2000
%E Corrected the offset, added one term, several comments and the Mathematica coding _Robert G. Wilson v_, Sep 12 2009