OFFSET
0,3
COMMENTS
To obtain the difference version of the 'Decade transform' of n first write n as a sum of its power-of-ten parts and then continue to calculate the absolute value of the difference between the adjacent parts until a single number remains. See the Examples for details.
See A330859 for the additive version of the same transform.
LINKS
Scott R. Shannon, Line graph of the terms for n=0 to 1000000.
EXAMPLE
Let n = 32871. Write n as a sum of its power-of-ten parts:
32871 = 30000+2000+800+70+1
Now take the absolute value of the difference between the adjacent numbers in this sum:
30000+2000+800+70+1 -> (|30000-2000|):(|2000-800|):(|800-70|):(|70-1|) = 28000:1200:730:69
Now repeat this until a single number remains:
28000:1200:730:69 -> 26800:470:661
26800:470:661 -> 26330:191
26330:191 -> 26139
Thus a(32871) = 26139.
Other examples:
a(11) = 9 as 11 = 10+1 thus 10:1 -> 9.
a(19) = 1 as 19 = 10+9 thus 10:9 -> 1.
a(20) = 20 as 20 = 20+0 thus 20:0 -> 20.
a(67) = 53 as 67 = 60+7 thus 60:7 -> 53.
a(1234) = 486 as 1234 = 1000+200+30+4 thus 1000:200:30:4 -> 800:170:26 -> 630:144 -> 486.
a(15010) = 0 as 15010 = 10000+5000+0+10+0 thus 10000:5000:0:10:0 -> 5000:5000:10:10 -> 0:4990:0 -> 4990:4990 -> 0.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Scott R. Shannon, Apr 26 2020
STATUS
approved