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.

A165012 a(n) = image of n under the base-4 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 0
4 3
5 0
6 3
7 6
8 6
9 3
10 0
11 3
12 9
13 6
14 3
15 0
16 15
17 15
18 30
19 45
20 15
21 0
22 15
23 30
24 30
25 15
26 15
27 30
28 45
29 30
30 30
31 30
32 30
33 30
34 30
35 45
36 30
37 15
38 15
39 30
40 30
41 15
42 0
43 15
44 45
45 30
46 15
47 15
48 45
49 45
50 45
51 45
52 45
53 30
54 30
55 30
56 45
57 30
58 15
59 15
60 45
61 30
62 15
63 0
64 63
65 75
66 138
67 201
68 75
69 63
70 126
71 189
72 138
73 126

List of values

[0, 0, 0, 0, 3, 0, 3, 6, 6, 3, 0, 3, 9, 6, 3, 0, 15, 15, 30, 45, 15, 0, 15, 30, 30, 15, 15, 30, 45, 30, 30, 30, 30, 30, 30, 45, 30, 15, 15, 30, 30, 15, 0, 15, 45, 30, 15, 15, 45, 45, 45, 45, 45, 30, 30, 30, 45, 30, 15, 15, 45, 30, 15, 0, 63, 75, 138, 201, 75, 63, 126, 189, 138, 126]