cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A164993 a(n) = image of n under the base-3 Kaprekar map n -> (n with digits sorted into descending order) - (n with digits sorted into ascending order).

Table of values

n a(n)
0 0
1 0
2 0
3 2
4 0
5 2
6 4
7 2
8 0
9 8
10 8
11 16
12 8
13 0
14 8
15 16
16 8
17 8
18 16
19 16
20 16
21 16
22 8
23 8
24 16
25 8
26 0
27 26
28 32
29 58
30 32
31 26
32 52
33 58
34 52
35 58
36 32
37 26
38 52
39 26
40 0
41 26
42 52
43 26
44 32
45 58
46 52
47 58
48 52
49 26
50 32
51 58
52 32
53 26
54 52
55 58
56 64
57 58
58 52
59 58
60 64
61 58
62 52
63 58
64 52
65 58
66 52
67 26
68 32
69 58
70 32
71 26
72 64
73 58
74 52
75 58
76 32

List of values

[0, 0, 0, 2, 0, 2, 4, 2, 0, 8, 8, 16, 8, 0, 8, 16, 8, 8, 16, 16, 16, 16, 8, 8, 16, 8, 0, 26, 32, 58, 32, 26, 52, 58, 52, 58, 32, 26, 52, 26, 0, 26, 52, 26, 32, 58, 52, 58, 52, 26, 32, 58, 32, 26, 52, 58, 64, 58, 52, 58, 64, 58, 52, 58, 52, 58, 52, 26, 32, 58, 32, 26, 64, 58, 52, 58, 32]