

A334387


The difference version of the 'Decade transform' : to obtain a(n) write n as a sum of its poweroften parts and then continue to calculate the absolute value of the difference between the adjacent parts until a single number remains.


2



0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 70, 69, 68
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


COMMENTS

To obtain the difference version of the 'Decade transform' of n first write n as a sum of its poweroften 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

Table of n, a(n) for n=0..72.
Scott R. Shannon, Line graph of the terms for n=0 to 1000000.


EXAMPLE

Let n = 32871. Write n as a sum of its poweroften 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 > (300002000):(2000800):(80070):(701) = 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

Cf. A330859, A011557, A040115, A053392.
Sequence in context: A213651 A287796 A073835 * A051503 A331375 A179622
Adjacent sequences: A334384 A334385 A334386 * A334388 A334389 A334390


KEYWORD

nonn,base


AUTHOR

Scott R. Shannon, Apr 26 2020


STATUS

approved



