OFFSET
10,4
COMMENTS
Leading zeros at any intermediate result are discarded. The first terms, from n=10 to n=99, are identical to A040115. - R. J. Mathar, Aug 28 2007
LINKS
T. D. Noe, Table of n, a(n) for n=10..10000
EXAMPLE
MAPLE
A040115 := proc(n) local digs, digsdiff, i; digsdiff := [] ; digs := convert(n, base, 10) ; for i from 2 to nops(digs) do digsdiff := [op(digsdiff), abs(op(i, digs)-op(i-1, digs))] ; od; add( op(i, digsdiff)*10^(i-1), i=1..nops(digsdiff)) ; end:
A113608 := proc(n) local a; a := A040115(n) ; while a>9 do a := A040115(a) ; od; RETURN(a) ; end: seq(A113608(n), n=10..110) ; # R. J. Mathar, Aug 28 2007
MATHEMATICA
a[n_] := NestWhile[FromDigits[Abs[Differences[IntegerDigits[#]]]] &, n, # > 9 &]; Array[a, 120, 10] (* Amiram Eldar, Nov 12 2024 *)
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Nov 09 2005
EXTENSIONS
Edited and extended by R. J. Mathar, Aug 28 2007
Further edited by N. J. A. Sloane, Aug 19 2008
STATUS
approved